@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | $foreignKey = is_null($foreignKey) ? $this->assumeForeignKey($related) : $foreignKey; |
| 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 = is_null($foreignKey) ? $this->assumeForeignKey($related) : $foreignKey; |
| 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) { |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | public function givenOne($related, $attributes, $reset = false): Model |
| 515 | 515 | { |
| 516 | 516 | return (new $related([], $this->parentModel))->setClient($this->getClient()) |
| 517 | - ->newFromBuilder($reset ? reset($attributes) : $attributes); |
|
| 517 | + ->newFromBuilder($reset ? reset($attributes) : $attributes); |
|
| 518 | 518 | } |
| 519 | 519 | |
| 520 | 520 | /** |
@@ -530,8 +530,8 @@ discard block |
||
| 530 | 530 | public function hasMany($related): HasMany |
| 531 | 531 | { |
| 532 | 532 | $builder = (new Builder())->setClass($related) |
| 533 | - ->setClient($this->getClient()) |
|
| 534 | - ->setParent($this); |
|
| 533 | + ->setClient($this->getClient()) |
|
| 534 | + ->setParent($this); |
|
| 535 | 535 | |
| 536 | 536 | return new HasMany($builder, $this); |
| 537 | 537 | } |
@@ -680,7 +680,7 @@ discard block |
||
| 680 | 680 | if ($this->exists) { |
| 681 | 681 | // TODO: If we get null from the PUT, throw/handle exception |
| 682 | 682 | $response = $this->getClient() |
| 683 | - ->put($this->getPath(), $this->getDirty()); |
|
| 683 | + ->put($this->getPath(), $this->getDirty()); |
|
| 684 | 684 | |
| 685 | 685 | // Record the changes |
| 686 | 686 | $this->syncChanges(); |
@@ -692,7 +692,7 @@ discard block |
||
| 692 | 692 | } |
| 693 | 693 | |
| 694 | 694 | $response = $this->getClient() |
| 695 | - ->post($this->getPath(), $this->toArray()); |
|
| 695 | + ->post($this->getPath(), $this->toArray()); |
|
| 696 | 696 | |
| 697 | 697 | $this->exists = true; |
| 698 | 698 | |