@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | $foreignKey = $foreignKey ?? $this->assumeForeignKey($related); |
268 | 268 | |
269 | 269 | $builder = (new Builder())->setClass($related) |
270 | - ->setClient($this->getClient()); |
|
270 | + ->setClient($this->getClient()); |
|
271 | 271 | |
272 | 272 | return new BelongsTo($builder, $this, $foreignKey); |
273 | 273 | } |
@@ -288,8 +288,8 @@ discard block |
||
288 | 288 | $foreignKey = $foreignKey ?? $this->assumeForeignKey($related); |
289 | 289 | |
290 | 290 | $builder = (new Builder())->setClass($related) |
291 | - ->setClient($this->getClient()) |
|
292 | - ->setParent($this); |
|
291 | + ->setClient($this->getClient()) |
|
292 | + ->setParent($this); |
|
293 | 293 | |
294 | 294 | return new ChildOf($builder, $this, $foreignKey); |
295 | 295 | } |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | |
311 | 311 | try { |
312 | 312 | $this->getClient() |
313 | - ->delete($this->getPath()); |
|
313 | + ->delete($this->getPath()); |
|
314 | 314 | |
315 | 315 | return true; |
316 | 316 | } catch (GuzzleException $e) { |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | public function givenOne($related, $attributes, $reset = false): Model |
505 | 505 | { |
506 | 506 | return (new $related([], $this->parentModel))->setClient($this->getClient()) |
507 | - ->newFromBuilder($reset ? reset($attributes) : $attributes); |
|
507 | + ->newFromBuilder($reset ? reset($attributes) : $attributes); |
|
508 | 508 | } |
509 | 509 | |
510 | 510 | /** |
@@ -520,8 +520,8 @@ discard block |
||
520 | 520 | public function hasMany($related): HasMany |
521 | 521 | { |
522 | 522 | $builder = (new Builder())->setClass($related) |
523 | - ->setClient($this->getClient()) |
|
524 | - ->setParent($this); |
|
523 | + ->setClient($this->getClient()) |
|
524 | + ->setParent($this); |
|
525 | 525 | |
526 | 526 | return new HasMany($builder, $this); |
527 | 527 | } |
@@ -670,7 +670,7 @@ discard block |
||
670 | 670 | if ($this->exists) { |
671 | 671 | // TODO: If we get null from the PUT, throw/handle exception |
672 | 672 | $response = $this->getClient() |
673 | - ->put($this->getPath(), $this->getDirty()); |
|
673 | + ->put($this->getPath(), $this->getDirty()); |
|
674 | 674 | |
675 | 675 | // Record the changes |
676 | 676 | $this->syncChanges(); |
@@ -682,7 +682,7 @@ discard block |
||
682 | 682 | } |
683 | 683 | |
684 | 684 | $response = $this->getClient() |
685 | - ->post($this->getPath(), $this->toArray()); |
|
685 | + ->post($this->getPath(), $this->toArray()); |
|
686 | 686 | |
687 | 687 | $this->exists = true; |
688 | 688 |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | ], |
107 | 107 | ] |
108 | 108 | ) |
109 | - ->getBody() |
|
110 | - ->getContents(), |
|
109 | + ->getBody() |
|
110 | + ->getContents(), |
|
111 | 111 | true |
112 | 112 | )['access_token']; |
113 | 113 | } catch (GuzzleException $e) { |
@@ -198,8 +198,8 @@ discard block |
||
198 | 198 | 'body' => empty($data) ? null : json_encode($data), |
199 | 199 | ] |
200 | 200 | ) |
201 | - ->getBody() |
|
202 | - ->getContents(), |
|
201 | + ->getBody() |
|
202 | + ->getContents(), |
|
203 | 203 | true |
204 | 204 | ); |
205 | 205 | } catch (GuzzleException $e) { |