Passed
Push — master ( e8c32f...5bd6a5 )
by Nikita
02:18
created
src/Gdaemon.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     public function setConfig(array $config)
99 99
     {
100 100
         foreach ($this->configurable as $setting) {
101
-            if ( ! isset($config[$setting])) {
101
+            if (!isset($config[$setting])) {
102 102
                 continue;
103 103
             }
104 104
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         // $this->_connection = @fsockopen($this->host, $this->port, $errno, $errstr, $this->timeout);
119 119
         $this->_connection = stream_socket_client("tcp://{$this->host}:{$this->port}", $errno, $errstr, 30);
120 120
 
121
-        if ( ! $this->_connection) {
121
+        if (!$this->_connection) {
122 122
             throw new RuntimeException('Could not connect to host: '
123 123
                 . $this->host
124 124
                 . ', port:' . $this->port
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     protected function getConnection()
135 135
     {
136
-        if (! is_resource($this->_connection)) {
136
+        if (!is_resource($this->_connection)) {
137 137
             $this->disconnect();
138 138
             $this->connect();
139 139
         }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
             return;
154 154
         }
155 155
 
156
-        $writeBinn= new BinnList;
156
+        $writeBinn = new BinnList;
157 157
 
158 158
         $writeBinn->addInt16(self::DAEMON_SERVER_MODE_AUTH);
159 159
         $writeBinn->addStr($username);
@@ -217,11 +217,11 @@  discard block
 block discarded – undo
217 217
             return $this->_socket;
218 218
         }
219 219
 
220
-        set_error_handler(function () {});
220
+        set_error_handler(function() {});
221 221
         $this->_socket = socket_import_stream($this->getConnection());
222 222
         restore_error_handler();
223 223
 
224
-        if (! $this->_socket) {
224
+        if (!$this->_socket) {
225 225
             $this->disconnect();
226 226
             throw new RuntimeException('Could not import socket');
227 227
         }
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
         $read = '';
244 244
         $readed = 0;
245 245
         $tries = 0;
246
-        while($len == 0 || $readed < $len) {
246
+        while ($len == 0 || $readed < $len) {
247 247
             $readlen = socket_recv($this->getSocket(), $readBuf, $this->maxBufsize, MSG_DONTWAIT);
248 248
 
249 249
             if ($readlen === false) {
Please login to merge, or discard this patch.