Passed
Pull Request — master (#423)
by
unknown
03:47
created
src/Picqer/Financials/Exact/Connection.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -219,12 +219,12 @@  discard block
 block discarded – undo
219 219
         }
220 220
 
221 221
         // If we have a token, sign the request
222
-        if (! $this->needsAuthentication() && ! empty($this->accessToken)) {
222
+        if ( ! $this->needsAuthentication() && ! empty($this->accessToken)) {
223 223
             $headers['Authorization'] = 'Bearer ' . $this->accessToken;
224 224
         }
225 225
 
226 226
         // Create param string
227
-        if (! empty($params)) {
227
+        if ( ! empty($params)) {
228 228
             $endpoint .= '?' . http_build_query($params);
229 229
         }
230 230
 
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
      */
290 290
     public function upload($topic, $body)
291 291
     {
292
-        $url = $this->getBaseUrl() . '/docs/XMLUpload.aspx?Topic=' . $topic .'&_Division=' . $this->getDivision();
292
+        $url = $this->getBaseUrl() . '/docs/XMLUpload.aspx?Topic=' . $topic . '&_Division=' . $this->getDivision();
293 293
 
294 294
         try {
295 295
             $request  = $this->createRequest('POST', $url, $body);
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
      */
590 590
     private function getTimestampFromExpiresIn($expiresIn)
591 591
     {
592
-        if (! ctype_digit($expiresIn)) {
592
+        if ( ! ctype_digit($expiresIn)) {
593 593
             throw new \InvalidArgumentException('Function requires a numeric expires value');
594 594
         }
595 595
 
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
      */
691 691
     private function parseExceptionForErrorMessages(Exception $e)
692 692
     {
693
-        if (! $e instanceof BadResponseException) {
693
+        if ( ! $e instanceof BadResponseException) {
694 694
             throw new ApiException($e->getMessage(), 0, $e);
695 695
         }
696 696
 
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
         $responseBody = $response->getBody()->getContents();
703 703
         $decodedResponseBody = json_decode($responseBody, true);
704 704
 
705
-        if (! is_null($decodedResponseBody) && isset($decodedResponseBody['error']['message']['value'])) {
705
+        if ( ! is_null($decodedResponseBody) && isset($decodedResponseBody['error']['message']['value'])) {
706 706
             $errorMessage = $decodedResponseBody['error']['message']['value'];
707 707
         } else {
708 708
             $errorMessage = $responseBody;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -491,8 +491,7 @@
 block discarded – undo
491 491
             }
492 492
 
493 493
             return $answer;
494
-        }
495
-        catch (\RuntimeException $e) {
494
+        } catch (\RuntimeException $e) {
496 495
             throw new ApiException($e->getMessage());
497 496
         }
498 497
     }
Please login to merge, or discard this patch.