Completed
Push — master ( 90e9c9...31f528 )
by Sergey
01:42
created
src/Protocol/Request/SimpleRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
     public function __construct($command, $args)
14 14
     {
15 15
         $command = $this->camelCaseToUnderScore($command);
16
-        $args = empty($args) ? '' : ' ' . implode(' ' , $args);
16
+        $args = empty($args) ? '' : ' ' . implode(' ', $args);
17 17
         $this->command = $command . $args . Parser::COMMAND_SEPARATOR;
18 18
     }
19 19
 
Please login to merge, or discard this patch.
src/Connection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
         $this->stream = $stream;
69 69
         $this->isConnecting = false;
70 70
 
71
-        $stream->on('data', function ($chunk) {
71
+        $stream->on('data', function($chunk) {
72 72
             $this->emit('data', [$chunk]);
73 73
         });
74 74
 
75 75
         $stream->on('close', [$this, 'close']);
76 76
 
77
-        while($this->queries) {
77
+        while ($this->queries) {
78 78
             $this->stream->write(array_shift($this->queries));
79 79
         }
80 80
     }
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
     public function close()
89 89
     {
90
-        if($this->stream) {
90
+        if ($this->stream) {
91 91
             $this->stream->close();
92 92
         }
93 93
 
@@ -100,13 +100,13 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function write($query)
102 102
     {
103
-        if($this->stream && $this->stream->isWritable()) {
103
+        if ($this->stream && $this->stream->isWritable()) {
104 104
             $this->stream->write($query);
105 105
             return;
106 106
         }
107 107
 
108 108
         $this->queries[] = $query;
109
-        if(!$this->isConnecting) {
109
+        if (!$this->isConnecting) {
110 110
             $this->connect();
111 111
         }
112 112
     }
Please login to merge, or discard this patch.
src/Client.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     protected function setConnectionHandlers()
73 73
     {
74
-        $this->connection->on('data', function ($chunk) {
74
+        $this->connection->on('data', function($chunk) {
75 75
             $parsed = $this->parser->parseRawResponse($chunk);
76 76
             $this->resolveRequests($parsed);
77 77
         });
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             $this->rejectPendingRequestsWith(new ConnectionClosedException());
81 81
         });
82 82
 
83
-        $this->connection->on('close', function () {
83
+        $this->connection->on('close', function() {
84 84
             if (!$this->isEnding) {
85 85
                 $this->emit('error', [new ConnectionClosedException()]);
86 86
             }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     {
97 97
         $request = new Request($name);
98 98
 
99
-        if($this->isEnding) {
99
+        if ($this->isEnding) {
100 100
             $request->reject(new ConnectionClosedException());
101 101
         } else {
102 102
             try {
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      */
174 174
     protected function rejectPendingRequestsWith(Exception $exception)
175 175
     {
176
-        while($this->hasPendingRequests()) {
176
+        while ($this->hasPendingRequests()) {
177 177
             $request = array_shift($this->requests);
178 178
             /* @var $request Request */
179 179
             $request->reject($exception);
Please login to merge, or discard this patch.