Apply some coding style changes.

This commit is contained in:
Daniele Alessandri
2011-10-18 15:03:04 +02:00
parent 4251664095
commit 20d872a306
222 changed files with 2789 additions and 1281 deletions
@@ -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";
}