simplify command

This commit is contained in:
2021-02-04 23:09:47 +03:00
parent b126094e74
commit 57b7715c2e

View File

@@ -159,9 +159,7 @@ abstract class Connection
return new Failure(new NotConnected()); return new Failure(new NotConnected());
} }
$command = [] === $params $command = implode(' ', [$command, ...((array) $params)]);
? $command
: implode(' ', [$command, ...((array) $params)]);
$buffer = $this->buffer->append($command.PHP_EOL); $buffer = $this->buffer->append($command.PHP_EOL);