Completed
Branch 5.6 (cd95fb)
by Rémi
10:17
created
src/Plugins/SoftDeletes/SoftDeletingScope.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     protected function addWithTrashed(Query $query)
75 75
     {
76
-        $query->macro('withTrashed', function (Query $query) {
76
+        $query->macro('withTrashed', function(Query $query) {
77 77
             $this->remove($query);
78 78
 
79 79
             return $query;
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     protected function addOnlyTrashed(Query $query)
90 90
     {
91
-        $query->macro('onlyTrashed', function (Query $query) {
91
+        $query->macro('onlyTrashed', function(Query $query) {
92 92
             $this->remove($query);
93 93
 
94 94
             $query->getQuery()->whereNotNull($query->getMapper()->getEntityMap()->getQualifiedDeletedAtColumn());
Please login to merge, or discard this patch.
src/System/Query.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -514,7 +514,7 @@
 block discarded – undo
514 514
      */
515 515
     protected function getHasRelationQuery($relation, $entity)
516 516
     {
517
-        return Relationship::noConstraints(function () use ($relation, $entity) {
517
+        return Relationship::noConstraints(function() use ($relation, $entity) {
518 518
             return $this->entityMap->$relation($entity);
519 519
         });
520 520
     }
Please login to merge, or discard this patch.
src/Relationships/BelongsToMany.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         // release, as this is not quite relevant in a datamapper context.
225 225
         $host = $this;
226 226
 
227
-        return array_map(function ($entity) use ($host) {
227
+        return array_map(function($entity) use ($host) {
228 228
             $entityWrapper = $this->factory->make($entity);
229 229
 
230 230
             $pivot = $this->newExistingPivot($this->cleanPivotAttributes($entityWrapper));
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
         // Once we have an array dictionary of child objects we can easily match the
441 441
         // children back to their parent using the dictionary and the keys on the
442 442
         // the parent models. Then we will return the hydrated models back out.
443
-        return array_map(function ($result) use ($dictionary, $keyName, $cache, $relation, $host) {
443
+        return array_map(function($result) use ($dictionary, $keyName, $cache, $relation, $host) {
444 444
             if (isset($dictionary[$key = $result[$keyName]])) {
445 445
                 $collection = $host->relatedMap->newCollection($dictionary[$key]);
446 446
 
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
     {
740 740
         $keyName = $this->relatedMap->getKeyName();
741 741
 
742
-        return array_map(function ($m) use ($keyName) {
742
+        return array_map(function($m) use ($keyName) {
743 743
             return $m->$keyName;
744 744
         }, $entities);
745 745
     }
Please login to merge, or discard this patch.
src/Relationships/HasOneOrMany.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@
 block discarded – undo
193 193
         // Once we have the dictionary we can simply spin through the parent models to
194 194
         // link them up with their children using the keyed dictionary to make the
195 195
         // matching very convenient and easy work. Then we'll just return them.
196
-        return array_map(function ($result) use ($dictionary, $cache, $type, $relation, $host) {
196
+        return array_map(function($result) use ($dictionary, $cache, $type, $relation, $host) {
197 197
             $key = $result[$host->localKey];
198 198
 
199 199
             if (isset($dictionary[$key])) {
Please login to merge, or discard this patch.
src/Relationships/HasManyThrough.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
         // Once we have the dictionary we can simply spin through the parent entities to
157 157
         // link them up with their children using the keyed dictionary to make the
158 158
         // matching very convenient and easy work. Then we'll just return them.
159
-        return array_map(function ($result) use ($relation, $relatedKey, $dictionary, $cache, $host) {
159
+        return array_map(function($result) use ($relation, $relatedKey, $dictionary, $cache, $host) {
160 160
             $key = $result[$relatedKey];
161 161
 
162 162
             if (isset($dictionary[$key])) {
Please login to merge, or discard this patch.
src/Relationships/MorphTo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@
 block discarded – undo
172 172
     {
173 173
         $foreign = $this->foreignKey;
174 174
 
175
-        return BaseCollection::make($this->dictionary[$type])->map(function ($entities) use ($foreign) {
175
+        return BaseCollection::make($this->dictionary[$type])->map(function($entities) use ($foreign) {
176 176
             return head($entities)->{$foreign};
177 177
         })->unique();
178 178
     }
Please login to merge, or discard this patch.
src/System/Mapper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         }
115 115
 
116 116
         // First, we'll cast every single result to array
117
-        $results = array_map(function ($item) {
117
+        $results = array_map(function($item) {
118 118
             return (array) $item;
119 119
         }, $results);
120 120
 
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
      */
395 395
     public function getGlobalScope($scope)
396 396
     {
397
-        return array_first($this->globalScopes, function ($key, $value) use ($scope) {
397
+        return array_first($this->globalScopes, function($key, $value) use ($scope) {
398 398
             return $scope instanceof $value;
399 399
         });
400 400
     }
Please login to merge, or discard this patch.
src/Plugins/SoftDeletes/SoftDeletesPlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         $host = $this;
26 26
 
27 27
         // Hook any mapper init and check the mapping include soft deletes.
28
-        $this->manager->registerGlobalEvent('initialized', function ($event, $payload = null) use ($host) {
28
+        $this->manager->registerGlobalEvent('initialized', function($event, $payload = null) use ($host) {
29 29
 
30 30
             // Cross Compatible Event handling with 5.3
31 31
             // TODO : find a replacement event handler
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $host = $this;
64 64
 
65 65
         // Register 'deleting' events
66
-        $mapper->registerEvent('deleting', function ($entity) use ($entityMap, $host) {
66
+        $mapper->registerEvent('deleting', function($entity) use ($entityMap, $host) {
67 67
 
68 68
             // Convert Entity into an EntityWrapper
69 69
             $factory = new Factory();
Please login to merge, or discard this patch.
src/Relationships/EmbedsMany.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
      */
67 67
     protected function buildEmbeddedCollection(array $rows): Collection
68 68
     {
69
-        return collect($rows)->map(function ($attributes) {
69
+        return collect($rows)->map(function($attributes) {
70 70
             return $this->buildEmbeddedObject($attributes);
71 71
         });
72 72
     }
Please login to merge, or discard this patch.