Passed
Pull Request — master (#355)
by
unknown
01:41
created
src/Picqer/Financials/Exact/Connection.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
     {
249 249
         if ($this->pauseForMinuteLimitEnabled()) {
250 250
             // take 90% of callsLimit so we have some tolerance when multiple process are running
251
-            if($this->callsLeft <= ($this->callsLimit * 0.10)) {
251
+            if ($this->callsLeft <= ($this->callsLimit * 0.10)) {
252 252
                 sleep(60);
253 253
             }
254 254
         }
@@ -296,12 +296,12 @@  discard block
 block discarded – undo
296 296
         }
297 297
 
298 298
         // If we have a token, sign the request
299
-        if (!$this->needsAuthentication() && !empty($this->accessToken)) {
299
+        if ( ! $this->needsAuthentication() && ! empty($this->accessToken)) {
300 300
             $headers['Authorization'] = 'Bearer ' . $this->accessToken;
301 301
         }
302 302
 
303 303
         // Create param string
304
-        if (!empty($params)) {
304
+        if ( ! empty($params)) {
305 305
             $endpoint .= '?' . http_build_query($params);
306 306
         }
307 307
 
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
      */
630 630
     private function getTimestampFromExpiresIn($expiresIn)
631 631
     {
632
-        if (!ctype_digit($expiresIn)) {
632
+        if ( ! ctype_digit($expiresIn)) {
633 633
             throw new \InvalidArgumentException('Function requires a numeric expires value');
634 634
         }
635 635
 
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
      */
728 728
     private function parseExceptionForErrorMessages(Exception $e)
729 729
     {
730
-        if (! $e instanceof BadResponseException) {
730
+        if ( ! $e instanceof BadResponseException) {
731 731
             throw new ApiException($e->getMessage());
732 732
         }
733 733
 
@@ -736,13 +736,13 @@  discard block
 block discarded – undo
736 736
         $responseBody = $response->getBody()->getContents();
737 737
         $decodedResponseBody = json_decode($responseBody, true);
738 738
 
739
-        if (! is_null($decodedResponseBody) && isset($decodedResponseBody['error']['message']['value'])) {
739
+        if ( ! is_null($decodedResponseBody) && isset($decodedResponseBody['error']['message']['value'])) {
740 740
             $errorMessage = $decodedResponseBody['error']['message']['value'];
741 741
         } else {
742 742
             $errorMessage = $responseBody;
743 743
         }
744 744
 
745
-        throw new ApiException('Error ' . $response->getStatusCode() .': ' . $errorMessage);
745
+        throw new ApiException('Error ' . $response->getStatusCode() . ': ' . $errorMessage);
746 746
     }
747 747
 
748 748
     /**
Please login to merge, or discard this patch.