Passed
Pull Request — develop (#53)
by Stephen
04:03
created
src/Api/Client.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
             $this->token->refresh($this);
210 210
         }
211 211
 
212
-        return 'Basic ' . base64_encode($this->token->getUsername() . ':' . $this->token->getPassword());
212
+        return 'Basic '.base64_encode($this->token->getUsername().':'.$this->token->getPassword());
213 213
     }
214 214
 
215 215
     /**
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 
247 247
         // For getAll calls, make sure to add pageSize & page to request
248 248
         if ($this->page) {
249
-            $uri .= (preg_match('/\\?/u', $uri) ? '&' : '?') . 'pageSize=' . $this->page_size . '&page=' . $this->page;
249
+            $uri .= (preg_match('/\\?/u', $uri) ? '&' : '?').'pageSize='.$this->page_size.'&page='.$this->page;
250 250
         }
251 251
 
252 252
         if (strlen($uri) > 2000) {
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
         return array_merge(
307 307
             [
308 308
                 'x-cw-usertype' => 'member',
309
-                'Accept'        => 'application/vnd.connectwise.com+json; version=' . $this->getVersion(),
309
+                'Accept'        => 'application/vnd.connectwise.com+json; version='.$this->getVersion(),
310 310
             ],
311 311
             $authorization_headers,
312 312
             $this->headers
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function getUrl($path = '')
344 344
     {
345
-        return $this->url . '/v4_6_release/apis/3.0/' . ltrim($path, '/');
345
+        return $this->url.'/v4_6_release/apis/3.0/'.ltrim($path, '/');
346 346
     }
347 347
 
348 348
     /**
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
      */
396 396
     protected function isLastPage(ResponseInterface $response)
397 397
     {
398
-        return !(bool)preg_match('/rel="last"$/u', $response->getHeader('Link')[0] ?? '');
398
+        return !(bool) preg_match('/rel="last"$/u', $response->getHeader('Link')[0] ?? '');
399 399
     }
400 400
 
401 401
     /**
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
      */
426 426
     protected function processResponse($resource, ResponseInterface $response)
427 427
     {
428
-        $response = (array)json_decode($response->getBody(), true);
428
+        $response = (array) json_decode($response->getBody(), true);
429 429
 
430 430
         // Nothing to map the response to, so just return it as-is
431 431
         if (!$model = $this->resolver->find($resource, $this->getVersion())) {
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
         // Have a collection of records, so cast them all as a Collection
441 441
         return new Collection(
442 442
             array_map(
443
-                function ($item) use ($model) {
443
+                function($item) use ($model) {
444 444
                     $item = new $model($item, $this);
445 445
 
446 446
                     return $item;
Please login to merge, or discard this patch.