@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | |
495 | 495 | $attributes[$key] = $this->mutateAttributeForArray( |
496 | 496 | $key, $attributes[$key] |
497 | - ); |
|
497 | + ); |
|
498 | 498 | } |
499 | 499 | |
500 | 500 | // Next we will handle any casts that have been setup for this model and cast |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | |
509 | 509 | $attributes[$key] = $this->castAttribute( |
510 | 510 | $key, $attributes[$key] |
511 | - ); |
|
511 | + ); |
|
512 | 512 | } |
513 | 513 | |
514 | 514 | // Here we will grab all of the appended, calculated attributes to this model |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | } |
544 | 544 | |
545 | 545 | return $this->getArrayableItems( |
546 | - array_combine($this->appends, $this->appends) |
|
546 | + array_combine($this->appends, $this->appends) |
|
547 | 547 | ); |
548 | 548 | } |
549 | 549 | |
@@ -710,26 +710,26 @@ discard block |
||
710 | 710 | } |
711 | 711 | |
712 | 712 | switch ($this->getCastType($key)) { |
713 | - case 'int': |
|
713 | + case 'int': |
|
714 | 714 | case 'integer': |
715 | 715 | return (int) $value; |
716 | - case 'real': |
|
716 | + case 'real': |
|
717 | 717 | case 'float': |
718 | 718 | case 'double': |
719 | 719 | return (float) $value; |
720 | - case 'string': |
|
720 | + case 'string': |
|
721 | 721 | return (string) $value; |
722 | - case 'bool': |
|
722 | + case 'bool': |
|
723 | 723 | case 'boolean': |
724 | 724 | return (bool) $value; |
725 | - case 'object': |
|
725 | + case 'object': |
|
726 | 726 | return $this->fromJson($value, true); |
727 | - case 'array': |
|
727 | + case 'array': |
|
728 | 728 | case 'json': |
729 | 729 | return $this->fromJson($value); |
730 | - case 'collection': |
|
730 | + case 'collection': |
|
731 | 731 | return Collection::wrap($this->fromJson($value)); |
732 | - default: |
|
732 | + default: |
|
733 | 733 | return $value; |
734 | 734 | } |
735 | 735 | } |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | // the model in a variable, which we will then use in the closure. |
136 | 136 | $model = $this; |
137 | 137 | |
138 | - return static::unguarded(function () use ($model, $attributes) { |
|
138 | + return static::unguarded(function() use ($model, $attributes) { |
|
139 | 139 | return $model->fill($attributes); |
140 | 140 | }); |
141 | 141 | } |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | */ |
166 | 166 | public function newInstance(array $attributes = []) |
167 | 167 | { |
168 | - return new static((array) $attributes); |
|
168 | + return new static((array)$attributes); |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | /** |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | { |
180 | 180 | $instance = new static(); |
181 | 181 | |
182 | - $items = array_map(function ($item) use ($instance) { |
|
182 | + $items = array_map(function($item) use ($instance) { |
|
183 | 183 | return $instance->newInstance($item); |
184 | 184 | }, $items); |
185 | 185 | |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | */ |
234 | 234 | public function withHidden($attributes) |
235 | 235 | { |
236 | - $this->hidden = array_diff($this->hidden, (array) $attributes); |
|
236 | + $this->hidden = array_diff($this->hidden, (array)$attributes); |
|
237 | 237 | |
238 | 238 | return $this; |
239 | 239 | } |
@@ -712,16 +712,16 @@ discard block |
||
712 | 712 | switch ($this->getCastType($key)) { |
713 | 713 | case 'int': |
714 | 714 | case 'integer': |
715 | - return (int) $value; |
|
715 | + return (int)$value; |
|
716 | 716 | case 'real': |
717 | 717 | case 'float': |
718 | 718 | case 'double': |
719 | - return (float) $value; |
|
719 | + return (float)$value; |
|
720 | 720 | case 'string': |
721 | - return (string) $value; |
|
721 | + return (string)$value; |
|
722 | 722 | case 'bool': |
723 | 723 | case 'boolean': |
724 | - return (bool) $value; |
|
724 | + return (bool)$value; |
|
725 | 725 | case 'object': |
726 | 726 | return $this->fromJson($value, true); |
727 | 727 | case 'array': |