@@ -35,7 +35,7 @@ |
||
35 | 35 | // If we have one result which is not an assoc array, make it the first element of an array for the |
36 | 36 | // collectionFromResult function so we always return a collection from filter |
37 | 37 | if ((bool) count(array_filter(array_keys($result), 'is_string'))) { |
38 | - $result = [ $result ]; |
|
38 | + $result = [$result]; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | $class = $this->class; |
@@ -77,7 +77,7 @@ |
||
77 | 77 | * @return mixed |
78 | 78 | */ |
79 | 79 | public function getSalesInvoiceLines() { |
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}'"); |
82 | 82 | } |
83 | 83 | return $this->attributes['PurchaseInvoiceLines']; |
@@ -58,7 +58,7 @@ discard block |
||
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 |
||
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 |
@@ -241,7 +241,7 @@ |
||
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 |