Passed
Push — master ( e049de...7c87b3 )
by Jonas
03:45
created
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->getQualifiedParentKeyName(), '=', $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/Ancestors.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->getQualifiedParentKeyName(), '=', $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->getQualifiedParentKeyName(), $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
     }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         $key = $this->andSelf ? $this->localKey : $this->getForeignKeyName();
122 122
 
123
-        $constraint = function (Builder $query) use ($key) {
123
+        $constraint = function(Builder $query) use ($key) {
124 124
             $query->whereColumn(
125 125
                 $query->getQuery()->from.'.'.$this->localKey,
126 126
                 '=',
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
         $key = $this->andSelf ? $this->localKey : $this->getForeignKeyName();
151 151
 
152
-        $constraint = function (Builder $query) use ($table, $key) {
152
+        $constraint = function(Builder $query) use ($table, $key) {
153 153
             $query->whereColumn(
154 154
                 $table.'.'.$this->localKey,
155 155
                 '=',
Please login to merge, or discard this patch.