@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | { |
| 42 | 42 | $portableRelations = $this->getPortableRelations($relations); |
| 43 | 43 | |
| 44 | - array_walk($portableRelations, [$this, 'loadPortableRelation']); |
|
| 44 | + array_walk($portableRelations, [ $this, 'loadPortableRelation' ]); |
|
| 45 | 45 | |
| 46 | 46 | $this->load(array_diff($relations, $portableRelations)); |
| 47 | 47 | } |
@@ -54,11 +54,11 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | private function getPortableRelations(array $relations) |
| 56 | 56 | { |
| 57 | - $portableRelations = []; |
|
| 57 | + $portableRelations = [ ]; |
|
| 58 | 58 | |
| 59 | 59 | foreach ($relations as $relation) { |
| 60 | 60 | if ($this->$relation()->getRelated() instanceof PortableContract) { |
| 61 | - $portableRelations[] = $relation; |
|
| 61 | + $portableRelations[ ] = $relation; |
|
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | |
@@ -73,10 +73,10 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | private function loadPortableRelation(string $relation) |
| 75 | 75 | { |
| 76 | - $this->attributes[$relation] = $this |
|
| 76 | + $this->attributes[ $relation ] = $this |
|
| 77 | 77 | ->$relation() |
| 78 | 78 | ->get() |
| 79 | - ->transform(function ($item) { |
|
| 79 | + ->transform(function($item) { |
|
| 80 | 80 | return $item->portable(); |
| 81 | 81 | }); |
| 82 | 82 | } |