Passed
Push — master ( 4e5334...4eb7e1 )
by Jonas
04:13
created
src/Eloquent/Relations/IsRecursiveRelation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     protected function buildDictionary(Collection $results)
42 42
     {
43
-        return $results->mapToDictionary(function (Model $result) {
43
+        return $results->mapToDictionary(function(Model $result) {
44 44
             return [$result->getFirstPathSegment() => $result];
45 45
         })->all();
46 46
     }
Please login to merge, or discard this patch.
src/Eloquent/Relations/Descendants.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     public function addConstraints()
22 22
     {
23 23
         if (static::$constraints) {
24
-            $constraint = function (Builder $query) {
24
+            $constraint = function(Builder $query) {
25 25
                 if ($this->andSelf) {
26 26
                     $query->where($this->getQualifiedLocalKeyName(), '=', $this->getParentKey());
27 27
                 } else {
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
         $keys = $this->getKeys($models, $this->localKey);
50 50
 
51
-        $constraint = function (Builder $query) use ($models, $whereIn, $column, $keys) {
51
+        $constraint = function(Builder $query) use ($models, $whereIn, $column, $keys) {
52 52
             $query->$whereIn($column, $keys);
53 53
         };
54 54
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
         $foreignKey = $this->getForeignKeyName();
98 98
 
99
-        return $results->mapToDictionary(function (Model $result) use ($dictionary, $foreignKey) {
99
+        return $results->mapToDictionary(function(Model $result) use ($dictionary, $foreignKey) {
100 100
             if ($result->hasNestedPath()) {
101 101
                 $key = $dictionary[$result->getFirstPathSegment()]->{$foreignKey};
102 102
             } else {
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             ? $query->getQuery()->from.'.'.$this->localKey
126 126
             : $this->foreignKey;
127 127
 
128
-        $constraint = function (Builder $query) use ($first) {
128
+        $constraint = function(Builder $query) use ($first) {
129 129
             $query->whereColumn(
130 130
                 $first,
131 131
                 '=',
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             ? $table.'.'.$this->localKey
157 157
             : $table.'.'.$this->getForeignKeyName();
158 158
 
159
-        $constraint = function (Builder $query) use ($first) {
159
+        $constraint = function(Builder $query) use ($first) {
160 160
             $query->whereColumn(
161 161
                 $first,
162 162
                 '=',
Please login to merge, or discard this patch.
src/Eloquent/Relations/Siblings.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                 $value = $this->related->newCollection($dictionary[$key]);
94 94
 
95 95
                 if (!$this->andSelf) {
96
-                    $value = $value->reject(function (Model $result) use ($model) {
96
+                    $value = $value->reject(function(Model $result) use ($model) {
97 97
                         return $result->{$result->getLocalKeyName()} == $model->{$model->getLocalKeyName()};
98 98
                     })->values();
99 99
                 }
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
         $second = $parentQuery->qualifyColumn($this->localKey);
134 134
 
135 135
         $query->select($columns)
136
-            ->where(function (Builder $query) use ($first, $second) {
136
+            ->where(function(Builder $query) use ($first, $second) {
137 137
                 $query->whereColumn($first, '=', $second)
138
-                    ->orWhere(function (Builder $query) use ($first, $second) {
138
+                    ->orWhere(function(Builder $query) use ($first, $second) {
139 139
                         $query->whereNull($first)->whereNull($second);
140 140
                     });
141 141
             });
@@ -171,9 +171,9 @@  discard block
 block discarded – undo
171 171
         $second = $this->getQualifiedParentKeyName();
172 172
 
173 173
         $query->select($columns)
174
-            ->where(function (Builder $query) use ($first, $second) {
174
+            ->where(function(Builder $query) use ($first, $second) {
175 175
                 $query->whereColumn($first, '=', $second)
176
-                    ->orWhere(function (Builder $query) use ($first, $second) {
176
+                    ->orWhere(function(Builder $query) use ($first, $second) {
177 177
                         $query->whereNull($first)->whereNull($second);
178 178
                     });
179 179
             });
Please login to merge, or discard this patch.
src/Eloquent/Relations/IsAncestorRelation.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     public function addConstraints()
19 19
     {
20 20
         if (static::$constraints) {
21
-            $constraint = function (Builder $query) {
21
+            $constraint = function(Builder $query) {
22 22
                 $key = $this->andSelf ? $this->getParentKey() : $this->getForeignKey();
23 23
 
24 24
                 $query->where($this->getQualifiedLocalKeyName(), '=', $key);
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
         $keys = $this->getKeys($models, $key);
44 44
 
45
-        $constraint = function (Builder $query) use ($whereIn, $keys) {
45
+        $constraint = function(Builder $query) use ($whereIn, $keys) {
46 46
             $query->$whereIn($this->getQualifiedLocalKeyName(), $keys);
47 47
         };
48 48
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         $keys = parent::getKeys($models, $key);
62 62
 
63
-        return array_filter($keys, function ($value) {
63
+        return array_filter($keys, function($value) {
64 64
             return !is_null($value);
65 65
         });
66 66
     }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
         $key = $this->andSelf ? $this->localKey : $this->getForeignKeyName();
110 110
 
111
-        $constraint = function (Builder $query) use ($key) {
111
+        $constraint = function(Builder $query) use ($key) {
112 112
             $query->whereColumn(
113 113
                 $query->getQuery()->from.'.'.$this->localKey,
114 114
                 '=',
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 
138 138
         $key = $this->andSelf ? $this->localKey : $this->getForeignKeyName();
139 139
 
140
-        $constraint = function (Builder $query) use ($table, $key) {
140
+        $constraint = function(Builder $query) use ($table, $key) {
141 141
             $query->whereColumn(
142 142
                 $table.'.'.$this->localKey,
143 143
                 '=',
Please login to merge, or discard this patch.
src/Eloquent/Relations/HasManyOfDescendants.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         if (static::$constraints) {
53 53
             $column = $this->andSelf ? $this->parent->getLocalKeyName() : $this->parent->getParentKeyName();
54 54
 
55
-            $constraint = function (Builder $query) use ($column) {
55
+            $constraint = function(Builder $query) use ($column) {
56 56
                 $query->where(
57 57
                     $column,
58 58
                     '=',
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
         $keys = $this->getKeys($models, $localKey);
80 80
 
81
-        $constraint = function (Builder $query) use ($keys, $localKey, $models, $whereIn) {
81
+        $constraint = function(Builder $query) use ($keys, $localKey, $models, $whereIn) {
82 82
             $query->$whereIn($localKey, $keys);
83 83
         };
84 84
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             ? $this->parent->getLocalKeyName()
179 179
             : $this->parent->getParentKeyName();
180 180
 
181
-        $constraint = function (Builder $query) use ($first, $table) {
181
+        $constraint = function(Builder $query) use ($first, $table) {
182 182
             $query->whereColumn(
183 183
                 $table.'.'.$first,
184 184
                 '=',
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 
214 214
         $query->withRecursiveExpression($name, $expression);
215 215
 
216
-        $query->withGlobalScope('HasManyOfDescendants', function (Builder $query) use ($name) {
216
+        $query->withGlobalScope('HasManyOfDescendants', function(Builder $query) use ($name) {
217 217
             $query->whereIn(
218 218
                 $this->foreignKey,
219 219
                 (new $this->parent)->setTable($name)->newQuery()->select($this->localKey)
Please login to merge, or discard this patch.
src/Eloquent/HasRecursiveRelationshipScopes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public function scopeTree(Builder $query, $maxDepth = null)
18 18
     {
19
-        $constraint = function (Builder $query) {
19
+        $constraint = function(Builder $query) {
20 20
             $query->isRoot();
21 21
         };
22 22
 
Please login to merge, or discard this patch.