@@ -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; |
@@ -206,7 +206,7 @@ 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 | |
@@ -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 |
@@ -81,7 +81,7 @@ |
||
81 | 81 | $class = $this->class; |
82 | 82 | |
83 | 83 | foreach ($result as $r) { |
84 | - yield new $class($this->connection, $r); |
|
84 | + yield new $class($this->connection, $r); |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | } |
@@ -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 | |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $result = [$result]; |
149 | 149 | } |
150 | 150 | |
151 | - foreach($result as $row){ |
|
151 | + foreach ($result as $row) { |
|
152 | 152 | yield new self($this->connection(), $row); |
153 | 153 | } |
154 | 154 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $nextResult = [$nextResult]; |
161 | 161 | } |
162 | 162 | |
163 | - foreach($nextResult as $row){ |
|
163 | + foreach ($nextResult as $row) { |
|
164 | 164 | yield new self($this->connection(), $row); |
165 | 165 | } |
166 | 166 | } |