Passed
Pull Request — master (#27)
by Sander
03:30
created
src/Portable.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
@@ -77,17 +77,17 @@  discard block
 block discarded – undo
77 77
 
78 78
         $collection = $instance
79 79
             ->get()
80
-            ->transform(function ($item) {
80
+            ->transform(function($item) {
81 81
                 return $item->portable();
82 82
             });
83 83
 
84 84
         $class = class_basename(get_class($instance));
85 85
 
86
-        if (in_array($class, ['HasOne', 'BelongsTo'])) {
86
+        if (in_array($class, [ 'HasOne', 'BelongsTo' ])) {
87 87
             $collection = $collection->first();
88 88
         }
89 89
 
90
-        $this->attributes[$relation] = $collection;
90
+        $this->attributes[ $relation ] = $collection;
91 91
     }
92 92
 
93 93
     /**
Please login to merge, or discard this patch.