Passed
Pull Request — master (#7)
by Sandro
02:05
created
src/Type/Document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -332,7 +332,7 @@
 block discarded – undo
332 332
                 case RequestMethodInterface::METHOD_PATCH:
333 333
                     $function = $this->method === RequestMethodInterface::METHOD_PUT ? 'replace' : 'update';
334 334
 
335
-                    $keys = array_map(function ($doc) {
335
+                    $keys = array_map(function($doc) {
336 336
                         if (isset($doc['_key'])) {
337 337
                             return ['_key' => $doc['_key']];
338 338
                         }
Please login to merge, or discard this patch.
src/Client.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             $customHeaders = $request->getHeaders();
118 118
             unset($customHeaders['Connection'], $customHeaders['Content-Length']);
119 119
 
120
-            if (! isset($customHeaders['Content-Type'])) {
120
+            if (!isset($customHeaders['Content-Type'])) {
121 121
                 $customHeaders['Content-Type'] = ['application/json'];
122 122
             }
123 123
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             if (true === $status['timed_out']) {
152 152
                 throw TimeoutException::ofRequest($request);
153 153
             }
154
-            if (! $this->useKeepAlive) {
154
+            if (!$this->useKeepAlive) {
155 155
                 $this->close();
156 156
             }
157 157
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
                 && $method !== 'HEAD'
200 200
                 && 1 === preg_match('/content-length: (\d+)/i', $message, $matches)
201 201
             ) {
202
-                $contentLength = (int)$matches[1];
202
+                $contentLength = (int) $matches[1];
203 203
             }
204 204
 
205 205
             if ($bodyLength === 0) {
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
                     $bodyLength = $bodyStart + $contentLength + 4;
210 210
                 }
211 211
             }
212
-        } while ($readTotal < $bodyLength && ! feof($this->handle));
212
+        } while ($readTotal < $bodyLength && !feof($this->handle));
213 213
 
214 214
         return $message;
215 215
     }
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     private function open(RequestInterface $request): void
260 260
     {
261 261
         if ($this->useKeepAlive && $this->handle !== null && is_resource($this->handle)) {
262
-            if (! feof($this->handle)) {
262
+            if (!feof($this->handle)) {
263 263
                 return;
264 264
             }
265 265
 
Please login to merge, or discard this patch.
src/TransactionalClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
         );
140 140
 
141 141
         if (0 !== count($guards)) {
142
-            \array_walk($guards, static function ($guard) use ($response) {
142
+            \array_walk($guards, static function($guard) use ($response) {
143 143
                 $guard($response);
144 144
             });
145 145
         }
Please login to merge, or discard this patch.
src/ClientOptions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -108,18 +108,18 @@  discard block
 block discarded – undo
108 108
             $this->options[self::OPTION_ENDPOINT]
109 109
         );
110 110
 
111
-        if (! isset($this->options[self::OPTION_ENDPOINT])) {
111
+        if (!isset($this->options[self::OPTION_ENDPOINT])) {
112 112
             throw new LogicException('Endpoint not specified');
113 113
         }
114 114
 
115 115
         if (isset($this->options[self::OPTION_AUTH_TYPE])
116
-            && ! in_array($this->options[self::OPTION_AUTH_TYPE], self::getSupportedAuthTypes(), true)
116
+            && !in_array($this->options[self::OPTION_AUTH_TYPE], self::getSupportedAuthTypes(), true)
117 117
         ) {
118 118
             throw new LogicException('Unsupported authorization method: ' . $this->options[self::OPTION_AUTH_TYPE]);
119 119
         }
120 120
 
121 121
         if (isset($this->options[self::OPTION_CONNECTION])
122
-            && ! in_array($this->options[self::OPTION_CONNECTION], self::getSupportedConnectionTypes(), true)
122
+            && !in_array($this->options[self::OPTION_CONNECTION], self::getSupportedConnectionTypes(), true)
123 123
         ) {
124 124
             throw new LogicException('Unsupported connection value: ' . $this->options[self::OPTION_CONNECTION]);
125 125
         }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     public function offsetGet($offset)
159 159
     {
160
-        if (! array_key_exists($offset, $this->options)) {
160
+        if (!array_key_exists($offset, $this->options)) {
161 161
             throw new LogicException('Invalid option ' . $offset);
162 162
         }
163 163
 
Please login to merge, or discard this patch.
src/Statement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -213,7 +213,7 @@
 block discarded – undo
213 213
             return true;
214 214
         }
215 215
 
216
-        if (! $this->streamHandler->hasMore() || $this->streamHandler->cursorId() === null) {
216
+        if (!$this->streamHandler->hasMore() || $this->streamHandler->cursorId() === null) {
217 217
             return false;
218 218
         }
219 219
 
Please login to merge, or discard this patch.
src/HttpHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
             $key = trim($parts[0]);
42 42
             $value = isset($parts[1]) ? trim($parts[1]) : '';
43 43
 
44
-            if (! isset($headers[$key])) {
44
+            if (!isset($headers[$key])) {
45 45
                 $headers[$key] = [];
46 46
             }
47 47
             $headers[$key][] = $value;
Please login to merge, or discard this patch.