mirror of
https://github.com/predis/predis.git
synced 2026-08-28 03:02:04 +00:00
Apply some coding style changes.
This commit is contained in:
@@ -5,8 +5,10 @@ namespace Predis\Protocol\Text;
|
||||
use Predis\Commands\ICommand;
|
||||
use Predis\Protocol\ICommandSerializer;
|
||||
|
||||
class TextCommandSerializer implements ICommandSerializer {
|
||||
public function serialize(ICommand $command) {
|
||||
class TextCommandSerializer implements ICommandSerializer
|
||||
{
|
||||
public function serialize(ICommand $command)
|
||||
{
|
||||
$commandId = $command->getId();
|
||||
$arguments = $command->getArguments();
|
||||
|
||||
@@ -14,9 +16,10 @@ class TextCommandSerializer implements ICommandSerializer {
|
||||
$reqlen = count($arguments) + 1;
|
||||
|
||||
$buffer = "*{$reqlen}\r\n\${$cmdlen}\r\n{$commandId}\r\n";
|
||||
|
||||
for ($i = 0; $i < $reqlen - 1; $i++) {
|
||||
$argument = $arguments[$i];
|
||||
$arglen = strlen($argument);
|
||||
$arglen = strlen($argument);
|
||||
$buffer .= "\${$arglen}\r\n{$argument}\r\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user