Completed
Branch master (a62430)
by Sandro
03:36
created
Category
src/TransactionalClient.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $return = [];
75 75
         $guards = [];
76 76
 
77
-        if (! empty($this->types)) {
77
+        if (!empty($this->types)) {
78 78
             $batch = Batch::fromTypes(...$this->types);
79 79
             $responseBatch = $this->client->sendRequest($batch->toRequest());
80 80
             BatchResult::fromResponse($responseBatch)->validateBatch($batch);
@@ -114,8 +114,8 @@  discard block
 block discarded – undo
114 114
             )->toRequest()
115 115
         );
116 116
 
117
-        if (! empty($guards)) {
118
-            \array_walk($guards, function ($guard) use ($response) {
117
+        if (!empty($guards)) {
118
+            \array_walk($guards, function($guard) use ($response) {
119 119
                 $guard($response);
120 120
             });
121 121
         }
Please login to merge, or discard this patch.
src/Type/Index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 
100 100
     public function toRequest(): RequestInterface
101 101
     {
102
-        if (! empty($this->options)) {
102
+        if (!empty($this->options)) {
103 103
             return new Request(
104 104
                 $this->method,
105 105
                 Url::INDEX . $this->uri,
Please login to merge, or discard this patch.
src/Type/Document.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
     {
302 302
         $uri = $this->uri;
303 303
 
304
-        if (! empty($this->options)) {
304
+        if (!empty($this->options)) {
305 305
             $uri .= '?' . http_build_query($this->options);
306 306
         }
307 307
 
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
                 case RequestMethodInterface::METHOD_PATCH:
336 336
                     $function = $this->method === RequestMethodInterface::METHOD_PUT ? 'replace' : 'update';
337 337
 
338
-                    $keys = array_map(function ($doc) {
338
+                    $keys = array_map(function($doc) {
339 339
                         if (isset($doc['_key'])) {
340 340
                             return ['_key' => $doc['_key']];
341 341
                         }
Please login to merge, or discard this patch.
src/Type/Cursor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
         if (empty($params['bindVars'])) {
70 70
             unset($params['bindVars']);
71 71
         }
72
-        if (! empty($params)) {
72
+        if (!empty($params)) {
73 73
             $params['options'] = $options;
74 74
         }
75 75
         return new self(
Please login to merge, or discard this patch.
src/HttpHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             $key = trim($parts[0]);
46 46
             $value = isset($parts[1]) ? trim($parts[1]) : '';
47 47
 
48
-            if (! isset($headers[$key])) {
48
+            if (!isset($headers[$key])) {
49 49
                 $headers[$key] = [];
50 50
             }
51 51
             $headers[$key][] = $value;
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         }
86 86
         // TODO check key
87 87
         $value = \json_decode($body->getContents())->{$key};
88
-        if (! \is_scalar($value)) {
88
+        if (!\is_scalar($value)) {
89 89
             $value = \json_encode($value);
90 90
         }
91 91
 
Please login to merge, or discard this patch.
src/Client.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             $customHeaders = array_merge($this->defaultHeaders, $request->getHeaders());
108 108
             unset($customHeaders['Connection'], $customHeaders['Content-Length']);
109 109
 
110
-            if (! isset($customHeaders['Content-Type'])) {
110
+            if (!isset($customHeaders['Content-Type'])) {
111 111
                 $customHeaders['Content-Type'] = ['application/json'];
112 112
             }
113 113
 
@@ -149,10 +149,10 @@  discard block
 block discarded – undo
149 149
 
150 150
             $status = stream_get_meta_data($this->handle);
151 151
 
152
-            if (! empty($status['timed_out'])) {
152
+            if (!empty($status['timed_out'])) {
153 153
                 throw TimeoutException::ofRequest($request);
154 154
             }
155
-            if (! $this->useKeepAlive) {
155
+            if (!$this->useKeepAlive) {
156 156
                 $this->close();
157 157
             }
158 158
 
@@ -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/Polyfill/Vpack.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     public function &__get($key)
122 122
     {
123 123
         $ret = null;
124
-        $ret =& $this->offsetGet($key);
124
+        $ret = & $this->offsetGet($key);
125 125
         if (is_array($ret)) {
126 126
             $ret = self::fromArray($ret);
127 127
         }
@@ -148,10 +148,10 @@  discard block
 block discarded – undo
148 148
     public function &offsetGet($key)
149 149
     {
150 150
         $ret = null;
151
-        if (! $this->offsetExists($key)) {
151
+        if (!$this->offsetExists($key)) {
152 152
             return $ret;
153 153
         }
154
-        $ret =& $this->data[$key];
154
+        $ret = & $this->data[$key];
155 155
         if (is_array($ret)) {
156 156
             $ret = self::fromArray($ret);
157 157
         }
Please login to merge, or discard this patch.
src/ClientOptions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
             throw new LogicException('Endpoint not specified');
113 113
         }
114 114
 
115
-        if (! empty($this->options[self::OPTION_AUTH_TYPE])
116
-            && ! in_array($this->options[self::OPTION_AUTH_TYPE], self::getSupportedAuthTypes(), true)
115
+        if (!empty($this->options[self::OPTION_AUTH_TYPE])
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
-        if (! empty($this->options[self::OPTION_CONNECTION])
122
-            && ! in_array($this->options[self::OPTION_CONNECTION], self::getSupportedConnectionTypes(), true)
121
+        if (!empty($this->options[self::OPTION_CONNECTION])
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   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      */
157 157
     public function __construct(ClientInterface $client, RequestInterface $request, array $options = [])
158 158
     {
159
-        if (! isset($options[self::ENTRY_TYPE])) {
159
+        if (!isset($options[self::ENTRY_TYPE])) {
160 160
             $options[self::ENTRY_TYPE] = self::ENTRY_TYPE_JSON;
161 161
         }
162 162
 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 
241 241
         switch ($this->options[self::ENTRY_TYPE]) {
242 242
             case self::ENTRY_TYPE_OBJECT:
243
-                return (object)$this->data->toArray();
243
+                return (object) $this->data->toArray();
244 244
                 break;
245 245
             case self::ENTRY_TYPE_ARRAY:
246 246
                 return $this->data->toArray();
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
     {
297 297
         switch ($this->options[self::ENTRY_TYPE]) {
298 298
             case self::ENTRY_TYPE_OBJECT:
299
-                return (object)$this->data[$this->position]->toArray();
299
+                return (object) $this->data[$this->position]->toArray();
300 300
             case self::ENTRY_TYPE_ARRAY:
301 301
                 return $this->data[$this->position]->toArray();
302 302
             case self::ENTRY_TYPE_JSON:
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
             return true;
327 327
         }
328 328
 
329
-        if (! $this->hasMore || $this->id === null) {
329
+        if (!$this->hasMore || $this->id === null) {
330 330
             return false;
331 331
         }
332 332
 
Please login to merge, or discard this patch.