@@ -124,10 +124,10 @@ |
||
124 | 124 | */ |
125 | 125 | public function addItem(array $array) |
126 | 126 | { |
127 | - if (! isset($this->attributes['PurchaseOrderLines']) || $this->attributes['PurchaseOrderLines'] == null) { |
|
127 | + if ( ! isset($this->attributes['PurchaseOrderLines']) || $this->attributes['PurchaseOrderLines'] == null) { |
|
128 | 128 | $this->attributes['PurchaseOrderLines'] = []; |
129 | 129 | } |
130 | - if (! isset($array['LineNumber'])) { |
|
130 | + if ( ! isset($array['LineNumber'])) { |
|
131 | 131 | $array['LineNumber'] = count($this->attributes['PurchaseOrderLines']) + 1; |
132 | 132 | } |
133 | 133 | $this->attributes['PurchaseOrderLines'][] = $array; |
@@ -52,7 +52,7 @@ |
||
52 | 52 | |
53 | 53 | public function addItem(array $array) |
54 | 54 | { |
55 | - if (! isset($this->attributes['CashEntryLines']) || $this->attributes['CashEntryLines'] == null) { |
|
55 | + if ( ! isset($this->attributes['CashEntryLines']) || $this->attributes['CashEntryLines'] == null) { |
|
56 | 56 | $this->attributes['CashEntryLines'] = []; |
57 | 57 | } |
58 | 58 | $this->attributes['CashEntryLines'][] = $array; |
@@ -142,10 +142,10 @@ |
||
142 | 142 | */ |
143 | 143 | public function addItem(array $array) |
144 | 144 | { |
145 | - if (! isset($this->attributes['SalesOrderLines']) || $this->attributes['SalesOrderLines'] == null) { |
|
145 | + if ( ! isset($this->attributes['SalesOrderLines']) || $this->attributes['SalesOrderLines'] == null) { |
|
146 | 146 | $this->attributes['SalesOrderLines'] = []; |
147 | 147 | } |
148 | - if (! isset($array['LineNumber'])) { |
|
148 | + if ( ! isset($array['LineNumber'])) { |
|
149 | 149 | $array['LineNumber'] = count($this->attributes['SalesOrderLines']) + 1; |
150 | 150 | } |
151 | 151 | $this->attributes['SalesOrderLines'][] = $array; |
@@ -112,10 +112,10 @@ |
||
112 | 112 | |
113 | 113 | public function addItem(array $array) |
114 | 114 | { |
115 | - if (! isset($this->attributes['SalesEntryLines']) || $this->attributes['SalesEntryLines'] == null) { |
|
115 | + if ( ! isset($this->attributes['SalesEntryLines']) || $this->attributes['SalesEntryLines'] == null) { |
|
116 | 116 | $this->attributes['SalesEntryLines'] = []; |
117 | 117 | } |
118 | - if (! isset($array['LineNumber'])) { |
|
118 | + if ( ! isset($array['LineNumber'])) { |
|
119 | 119 | $array['LineNumber'] = count($this->attributes['SalesEntryLines']) + 1; |
120 | 120 | } |
121 | 121 | $this->attributes['SalesEntryLines'][] = $array; |
@@ -67,10 +67,10 @@ |
||
67 | 67 | |
68 | 68 | public function addItem(array $array) |
69 | 69 | { |
70 | - if (! isset($this->attributes['PurchaseEntryLines']) || $this->attributes['PurchaseEntryLines'] == null) { |
|
70 | + if ( ! isset($this->attributes['PurchaseEntryLines']) || $this->attributes['PurchaseEntryLines'] == null) { |
|
71 | 71 | $this->attributes['PurchaseEntryLines'] = []; |
72 | 72 | } |
73 | - if (! isset($array['LineNumber'])) { |
|
73 | + if ( ! isset($array['LineNumber'])) { |
|
74 | 74 | $array['LineNumber'] = count($this->attributes['PurchaseEntryLines']) + 1; |
75 | 75 | } |
76 | 76 | $this->attributes['PurchaseEntryLines'][] = $array; |
@@ -59,7 +59,7 @@ |
||
59 | 59 | |
60 | 60 | public function addItem(array $array) |
61 | 61 | { |
62 | - if (! isset($this->attributes['BankEntryLines']) || $this->attributes['BankEntryLines'] == null) { |
|
62 | + if ( ! isset($this->attributes['BankEntryLines']) || $this->attributes['BankEntryLines'] == null) { |
|
63 | 63 | $this->attributes['BankEntryLines'] = []; |
64 | 64 | } |
65 | 65 | $this->attributes['BankEntryLines'][] = $array; |
@@ -123,10 +123,10 @@ |
||
123 | 123 | */ |
124 | 124 | public function addItem(array $array) |
125 | 125 | { |
126 | - if (! isset($this->attributes['QuotationLines']) || $this->attributes['QuotationLines'] == null) { |
|
126 | + if ( ! isset($this->attributes['QuotationLines']) || $this->attributes['QuotationLines'] == null) { |
|
127 | 127 | $this->attributes['QuotationLines'] = []; |
128 | 128 | } |
129 | - if (! isset($array['LineNumber'])) { |
|
129 | + if ( ! isset($array['LineNumber'])) { |
|
130 | 130 | $array['LineNumber'] = count($this->attributes['QuotationLines']) + 1; |
131 | 131 | } |
132 | 132 | $this->attributes['QuotationLines'][] = $array; |
@@ -40,7 +40,7 @@ |
||
40 | 40 | |
41 | 41 | public function addItem(array $array) |
42 | 42 | { |
43 | - if (! isset($this->attributes['GeneralJournalEntryLines']) || $this->attributes['GeneralJournalEntryLines'] == null) { |
|
43 | + if ( ! isset($this->attributes['GeneralJournalEntryLines']) || $this->attributes['GeneralJournalEntryLines'] == null) { |
|
44 | 44 | $this->attributes['GeneralJournalEntryLines'] = []; |
45 | 45 | } |
46 | 46 | $this->attributes['GeneralJournalEntryLines'][] = $array; |
@@ -174,12 +174,12 @@ discard block |
||
174 | 174 | } |
175 | 175 | |
176 | 176 | // If we have a token, sign the request |
177 | - if (! $this->needsAuthentication() && ! empty($this->accessToken)) { |
|
177 | + if ( ! $this->needsAuthentication() && ! empty($this->accessToken)) { |
|
178 | 178 | $headers['Authorization'] = 'Bearer ' . $this->accessToken; |
179 | 179 | } |
180 | 180 | |
181 | 181 | // Create param string |
182 | - if (! empty($params)) { |
|
182 | + if ( ! empty($params)) { |
|
183 | 183 | $endpoint .= '?' . http_build_query($params); |
184 | 184 | } |
185 | 185 | |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | */ |
486 | 486 | private function getTimestampFromExpiresIn($expiresIn) |
487 | 487 | { |
488 | - if (! ctype_digit($expiresIn)) { |
|
488 | + if ( ! ctype_digit($expiresIn)) { |
|
489 | 489 | throw new \InvalidArgumentException('Function requires a numeric expires value'); |
490 | 490 | } |
491 | 491 | |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | */ |
587 | 587 | private function parseExceptionForErrorMessages(Exception $e) |
588 | 588 | { |
589 | - if (! $e instanceof BadResponseException) { |
|
589 | + if ( ! $e instanceof BadResponseException) { |
|
590 | 590 | throw new ApiException($e->getMessage()); |
591 | 591 | } |
592 | 592 | |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | $responseBody = $response->getBody()->getContents(); |
596 | 596 | $decodedResponseBody = json_decode($responseBody, true); |
597 | 597 | |
598 | - if (! is_null($decodedResponseBody) && isset($decodedResponseBody['error']['message']['value'])) { |
|
598 | + if ( ! is_null($decodedResponseBody) && isset($decodedResponseBody['error']['message']['value'])) { |
|
599 | 599 | $errorMessage = $decodedResponseBody['error']['message']['value']; |
600 | 600 | } else { |
601 | 601 | $errorMessage = $responseBody; |