@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | try { |
| 151 | 151 | if (array_key_exists($key, $this->attributes) && is_array($this->attributes[$key]) && array_key_exists('__deferred', $this->attributes[$key])) { |
| 152 | - $class = preg_replace('/(.+?)s?$/', __NAMESPACE__.'\\\$1', $key); // Filter plural 's' and add namespace |
|
| 152 | + $class = preg_replace('/(.+?)s?$/', __NAMESPACE__ . '\\\$1', $key); // Filter plural 's' and add namespace |
|
| 153 | 153 | $deferred = new $class($this->connection()); |
| 154 | 154 | $uri = $this->attributes[$key]['__deferred']['uri']; |
| 155 | 155 | $deferred->connection()->nextUrl = $uri; // $uri is complete, by setting it to nextUrl Connection->formatUrl leaves it as is. |
@@ -206,11 +206,11 @@ discard block |
||
| 206 | 206 | */ |
| 207 | 207 | public function exists() |
| 208 | 208 | { |
| 209 | - if (!array_key_exists($this->primaryKey, $this->attributes)) { |
|
| 209 | + if ( ! array_key_exists($this->primaryKey, $this->attributes)) { |
|
| 210 | 210 | return false; |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | - return !empty($this->attributes[$this->primaryKey]); |
|
| 213 | + return ! empty($this->attributes[$this->primaryKey]); |
|
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | /** |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | |
| 232 | 232 | $attributes[$attribute] = []; |
| 233 | 233 | foreach ($collection as $value) { |
| 234 | - if (!empty($value->deferred)) { |
|
| 234 | + if ( ! empty($value->deferred)) { |
|
| 235 | 235 | $value->attributes = array_merge($value->attributes, $value->deferred); |
| 236 | 236 | } |
| 237 | 237 | |
@@ -110,10 +110,10 @@ |
||
| 110 | 110 | |
| 111 | 111 | public function addItem(array $array) |
| 112 | 112 | { |
| 113 | - if (!isset($this->attributes['PurchaseEntryLines']) || $this->attributes['PurchaseEntryLines'] == null) { |
|
| 113 | + if ( ! isset($this->attributes['PurchaseEntryLines']) || $this->attributes['PurchaseEntryLines'] == null) { |
|
| 114 | 114 | $this->attributes['PurchaseEntryLines'] = []; |
| 115 | 115 | } |
| 116 | - if (!isset($array['LineNumber'])) { |
|
| 116 | + if ( ! isset($array['LineNumber'])) { |
|
| 117 | 117 | $array['LineNumber'] = count($this->attributes['PurchaseEntryLines']) + 1; |
| 118 | 118 | } |
| 119 | 119 | $this->attributes['PurchaseEntryLines'][] = $array; |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | ]; |
| 33 | 33 | |
| 34 | 34 | $res = $client->get($this->getDownloadUrl(), [ |
| 35 | - 'headers' => $headers, |
|
| 35 | + 'headers' => $headers, |
|
| 36 | 36 | ]); |
| 37 | 37 | |
| 38 | 38 | return $res->getBody(); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | 'Accept' => 'application/json', |
| 29 | 29 | 'Content-Type' => 'application/json', |
| 30 | 30 | 'Prefer' => 'return=representation', |
| 31 | - 'Authorization' => 'Bearer '.$this->connection()->getAccessToken(), |
|
| 31 | + 'Authorization' => 'Bearer ' . $this->connection()->getAccessToken(), |
|
| 32 | 32 | ]; |
| 33 | 33 | |
| 34 | 34 | $res = $client->get($this->getDownloadUrl(), [ |
@@ -62,13 +62,13 @@ |
||
| 62 | 62 | { |
| 63 | 63 | $primaryKey = $this->primaryKeyContent(); |
| 64 | 64 | |
| 65 | - return $this->connection()->put($this->url()."(guid'$primaryKey')", $this->json()); |
|
| 65 | + return $this->connection()->put($this->url() . "(guid'$primaryKey')", $this->json()); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | public function delete() |
| 69 | 69 | { |
| 70 | 70 | $primaryKey = $this->primaryKeyContent(); |
| 71 | 71 | |
| 72 | - return $this->connection()->delete($this->url()."(guid'$primaryKey')"); |
|
| 72 | + return $this->connection()->delete($this->url() . "(guid'$primaryKey')"); |
|
| 73 | 73 | } |
| 74 | 74 | } |
@@ -5,4 +5,4 @@ |
||
| 5 | 5 | /* |
| 6 | 6 | * Added deprecated Subscriptions class for backward compatibility |
| 7 | 7 | */ |
| 8 | -class_alias(__NAMESPACE__.'\Subscription', __NAMESPACE__.'\Subscriptions'); |
|
| 8 | +class_alias(__NAMESPACE__ . '\Subscription', __NAMESPACE__ . '\Subscriptions'); |
|
@@ -5,4 +5,4 @@ |
||
| 5 | 5 | /* |
| 6 | 6 | * Added deprecated SubscriptionLines class for backward compatibility |
| 7 | 7 | */ |
| 8 | -class_alias(__NAMESPACE__.'\SubscriptionLine', __NAMESPACE__.'\SubscriptionLines'); |
|
| 8 | +class_alias(__NAMESPACE__ . '\SubscriptionLine', __NAMESPACE__ . '\SubscriptionLines'); |
|
@@ -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; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | use Query\Findable; |
| 23 | 23 | |
| 24 | 24 | protected $fillable = [ |
| 25 | - 'ID', |
|
| 25 | + 'ID', |
|
| 26 | 26 | 'Created', |
| 27 | 27 | 'Description', |
| 28 | 28 | 'DocumentIsCreatable', |
@@ -5,4 +5,4 @@ |
||
| 5 | 5 | /* |
| 6 | 6 | * Added deprecated Transactions class for backward compatibility |
| 7 | 7 | */ |
| 8 | -class_alias(__NAMESPACE__.'\Transaction', __NAMESPACE__.'\Transactions'); |
|
| 8 | +class_alias(__NAMESPACE__ . '\Transaction', __NAMESPACE__ . '\Transactions'); |
|