Completed
Push — master ( 8e6c0f...d63375 )
by Stephan
02:11
created
src/Picqer/Financials/Exact/Query/Findable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      *
59 59
      * @return string (guid)
60 60
      */
61
-    public function findId($code, $key='Code')
61
+    public function findId($code, $key = 'Code')
62 62
     {
63 63
         if ($this->isFillable($key)) {
64 64
             $format = ($this->url() == 'crm/Accounts' && $key === 'Code') ? '%18s' : '%s';
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
         $result = $this->connection()->get($this->url(), $request, $headers);
110 110
 
111
-        if (!empty($divisionId)) {
111
+        if ( ! empty($divisionId)) {
112 112
             $this->connection()->setDivision($originalDivision); // Restore division
113 113
         }
114 114
 
Please login to merge, or discard this patch.
src/Picqer/Financials/Exact/Model.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -241,7 +241,7 @@
 block discarded – undo
241 241
 
242 242
                 $attributes[$attribute] = [];
243 243
                 foreach ($collection as $value) {
244
-                    if(!empty($value->deferred)) {
244
+                    if ( ! empty($value->deferred)) {
245 245
                         $value->attributes = array_merge($value->attributes, $value->deferred);
246 246
                     }
247 247
 
Please login to merge, or discard this patch.
src/Picqer/Financials/Exact/PurchaseInvoice.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
      * @return mixed
78 78
      */
79 79
     public function getPurchaseInvoiceLines($statement = '') {
80
-        if(array_key_exists('__deferred', $this->attributes['PurchaseInvoiceLines'])) {
80
+        if (array_key_exists('__deferred', $this->attributes['PurchaseInvoiceLines'])) {
81 81
             $this->attributes['PurchaseInvoiceLines'] = (new PurchaseInvoiceLine($this->connection()))->filter("InvoiceID eq guid'{$this->ID}'", "", "", $statement);
82 82
         }
83 83
         return $this->attributes['PurchaseInvoiceLines'];
Please login to merge, or discard this patch.
src/Picqer/Financials/Exact/Connection.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -166,12 +166,12 @@  discard block
 block discarded – undo
166 166
         }
167 167
 
168 168
         // If we have a token, sign the request
169
-        if (!$this->needsAuthentication() && !empty($this->accessToken)) {
169
+        if ( ! $this->needsAuthentication() && ! empty($this->accessToken)) {
170 170
             $headers['Authorization'] = 'Bearer ' . $this->accessToken;
171 171
         }
172 172
 
173 173
         // Create param string
174
-        if (!empty($params)) {
174
+        if ( ! empty($params)) {
175 175
             $endpoint .= '?' . http_build_query($params);
176 176
         }
177 177
 
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
      */
472 472
     private function getTimestampFromExpiresIn($expiresIn)
473 473
     {
474
-        if (!ctype_digit($expiresIn)) {
474
+        if ( ! ctype_digit($expiresIn)) {
475 475
             throw new \InvalidArgumentException('Function requires a numeric expires value');
476 476
         }
477 477
 
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
      */
556 556
     private function parseExceptionForErrorMessages(Exception $e)
557 557
     {
558
-        if (! $e instanceof BadResponseException) {
558
+        if ( ! $e instanceof BadResponseException) {
559 559
             throw new ApiException($e->getMessage());
560 560
         }
561 561
 
@@ -564,13 +564,13 @@  discard block
 block discarded – undo
564 564
         $responseBody = $response->getBody()->getContents();
565 565
         $decodedResponseBody = json_decode($responseBody, true);
566 566
 
567
-        if (! is_null($decodedResponseBody) && isset($decodedResponseBody['error']['message']['value'])) {
567
+        if ( ! is_null($decodedResponseBody) && isset($decodedResponseBody['error']['message']['value'])) {
568 568
             $errorMessage = $decodedResponseBody['error']['message']['value'];
569 569
         } else {
570 570
             $errorMessage = $responseBody;
571 571
         }
572 572
 
573
-        throw new ApiException('Error ' . $response->getStatusCode() .': ' . $errorMessage);
573
+        throw new ApiException('Error ' . $response->getStatusCode() . ': ' . $errorMessage);
574 574
     }
575 575
 
576 576
     /**
Please login to merge, or discard this patch.