Passed
Pull Request — master (#363)
by Stephan
01:36
created
src/Picqer/Financials/Exact/Connection.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -199,12 +199,12 @@  discard block
 block discarded – undo
199 199
         }
200 200
 
201 201
         // If we have a token, sign the request
202
-        if (! $this->needsAuthentication() && ! empty($this->accessToken)) {
202
+        if ( ! $this->needsAuthentication() && ! empty($this->accessToken)) {
203 203
             $headers['Authorization'] = 'Bearer ' . $this->accessToken;
204 204
         }
205 205
 
206 206
         // Create param string
207
-        if (! empty($params)) {
207
+        if ( ! empty($params)) {
208 208
             $endpoint .= '?' . http_build_query($params);
209 209
         }
210 210
 
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
      */
513 513
     private function getTimestampFromExpiresIn($expiresIn)
514 514
     {
515
-        if (! ctype_digit($expiresIn)) {
515
+        if ( ! ctype_digit($expiresIn)) {
516 516
             throw new \InvalidArgumentException('Function requires a numeric expires value');
517 517
         }
518 518
 
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
      */
614 614
     private function parseExceptionForErrorMessages(Exception $e)
615 615
     {
616
-        if (! $e instanceof BadResponseException) {
616
+        if ( ! $e instanceof BadResponseException) {
617 617
             throw new ApiException($e->getMessage());
618 618
         }
619 619
 
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
         $responseBody = $response->getBody()->getContents();
623 623
         $decodedResponseBody = json_decode($responseBody, true);
624 624
 
625
-        if (! is_null($decodedResponseBody) && isset($decodedResponseBody['error']['message']['value'])) {
625
+        if ( ! is_null($decodedResponseBody) && isset($decodedResponseBody['error']['message']['value'])) {
626 626
             $errorMessage = $decodedResponseBody['error']['message']['value'];
627 627
         } else {
628 628
             $errorMessage = $responseBody;
@@ -732,11 +732,11 @@  discard block
 block discarded – undo
732 732
 
733 733
     private function extractRateLimits(Response $response)
734 734
     {
735
-        $this->dailyLimit = (int)$response->getHeaderLine('X-RateLimit-Limit');
736
-        $this->dailyLimitRemaining = (int)$response->getHeaderLine('X-RateLimit-Remaining');
737
-        $this->dailyLimitReset = (int)$response->getHeaderLine('X-RateLimit-Reset');
735
+        $this->dailyLimit = (int) $response->getHeaderLine('X-RateLimit-Limit');
736
+        $this->dailyLimitRemaining = (int) $response->getHeaderLine('X-RateLimit-Remaining');
737
+        $this->dailyLimitReset = (int) $response->getHeaderLine('X-RateLimit-Reset');
738 738
 
739
-        $this->minutelyLimit = (int)$response->getHeaderLine('X-RateLimit-Minutely-Limit');
740
-        $this->minutelyLimitRemaining = (int)$response->getHeaderLine('X-RateLimit-Minutely-Remaining');
739
+        $this->minutelyLimit = (int) $response->getHeaderLine('X-RateLimit-Minutely-Limit');
740
+        $this->minutelyLimitRemaining = (int) $response->getHeaderLine('X-RateLimit-Minutely-Remaining');
741 741
     }
742 742
 }
Please login to merge, or discard this patch.