Passed
Pull Request — master (#45)
by Stephen
11:07 queued 14s
created
src/Api/Client.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             $this->token->refresh($this);
207 207
         }
208 208
 
209
-        return 'Basic ' . base64_encode($this->token->getUsername() . ':' . $this->token->getPassword());
209
+        return 'Basic '.base64_encode($this->token->getUsername().':'.$this->token->getPassword());
210 210
     }
211 211
 
212 212
     /**
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 
244 244
         // For getAll calls, make sure to add pageSize & page to request
245 245
         if ($this->page) {
246
-            $uri .= (preg_match('/\\?/u', $uri) ? '&' : '?') . 'pageSize=' . $this->page_size . '&page=' . $this->page;
246
+            $uri .= (preg_match('/\\?/u', $uri) ? '&' : '?').'pageSize='.$this->page_size.'&page='.$this->page;
247 247
         }
248 248
 
249 249
         if (strlen($uri) > 2000) {
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
         return array_merge(
304 304
             [
305 305
                 'x-cw-usertype' => 'member',
306
-                'Accept'        => 'application/vnd.connectwise.com+json; version=' . $this->getVersion(),
306
+                'Accept'        => 'application/vnd.connectwise.com+json; version='.$this->getVersion(),
307 307
             ],
308 308
             $authorization_headers,
309 309
             $this->headers
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
      */
340 340
     public function getUrl($path = null)
341 341
     {
342
-        return $this->url . '/v4_6_release/apis/3.0/' . ltrim($path, '/');
342
+        return $this->url.'/v4_6_release/apis/3.0/'.ltrim($path, '/');
343 343
     }
344 344
 
345 345
     /**
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
      */
393 393
     protected function isLastPage(ResponseInterface $response)
394 394
     {
395
-        return !(bool)preg_match('/rel="last"$/u', $response->getHeader('Link')[0] ?? null);
395
+        return !(bool) preg_match('/rel="last"$/u', $response->getHeader('Link')[0] ?? null);
396 396
     }
397 397
 
398 398
     /**
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
      */
423 423
     protected function processResponse($resource, ResponseInterface $response)
424 424
     {
425
-        $response = (array)json_decode($response->getBody(), true);
425
+        $response = (array) json_decode($response->getBody(), true);
426 426
 
427 427
         // Nothing to map the response to, so just return it as-is
428 428
         if (!$model = $this->resolver->find($resource, $this->getVersion())) {
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
         // Have a collection of records, so cast them all as a Collection
438 438
         return new Collection(
439 439
             array_map(
440
-                function ($item) use ($model) {
440
+                function($item) use ($model) {
441 441
                     $item = new $model($item, $this);
442 442
 
443 443
                     return $item;
Please login to merge, or discard this patch.