Passed
Push — master ( d68df3...db5a99 )
by Jonas
11:14 queued 08:17
created
Eloquent/Relations/Traits/Concatenation/IsConcatenableAncestorsRelation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
     {
62 62
         $pathSeparator = $this->related->getPathSeparator();
63 63
 
64
-        return $results->mapToDictionary(function (Model $result) use ($pathSeparator) {
64
+        return $results->mapToDictionary(function(Model $result) use ($pathSeparator) {
65 65
             $key = strtok($result->laravel_through_key, $pathSeparator);
66 66
 
67 67
             return [$key => $result];
Please login to merge, or discard this patch.
src/Eloquent/Relations/Siblings.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         $keys = $this->getKeys($models, $this->localKey);
69 69
 
70 70
         $this->query->where(
71
-            function (Builder $query) use ($keys) {
71
+            function(Builder $query) use ($keys) {
72 72
                 $query->whereIn($this->foreignKey, $keys);
73 73
 
74 74
                 if (in_array(null, $keys, true)) {
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                 $value = $this->related->newCollection($dictionary[$key]);
98 98
 
99 99
                 if (!$this->andSelf) {
100
-                    $value = $value->reject(function (Model $result) use ($model) {
100
+                    $value = $value->reject(function(Model $result) use ($model) {
101 101
                         return $result->{$result->getLocalKeyName()} == $model->{$model->getLocalKeyName()};
102 102
                     })->values();
103 103
                 }
@@ -137,9 +137,9 @@  discard block
 block discarded – undo
137 137
         $second = $parentQuery->qualifyColumn($this->localKey);
138 138
 
139 139
         $query->select($columns)
140
-            ->where(function (Builder $query) use ($first, $second) {
140
+            ->where(function(Builder $query) use ($first, $second) {
141 141
                 $query->whereColumn($first, '=', $second)
142
-                    ->orWhere(function (Builder $query) use ($first, $second) {
142
+                    ->orWhere(function(Builder $query) use ($first, $second) {
143 143
                         $query->whereNull($first)->whereNull($second);
144 144
                     });
145 145
             });
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
         $second = $this->getQualifiedParentKeyName();
176 176
 
177 177
         $query->select($columns)
178
-            ->where(function (Builder $query) use ($first, $second) {
178
+            ->where(function(Builder $query) use ($first, $second) {
179 179
                 $query->whereColumn($first, '=', $second)
180
-                    ->orWhere(function (Builder $query) use ($first, $second) {
180
+                    ->orWhere(function(Builder $query) use ($first, $second) {
181 181
                         $query->whereNull($first)->whereNull($second);
182 182
                     });
183 183
             });
Please login to merge, or discard this patch.
src/Query/Grammars/SQLiteGrammar.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      */
19 19
     public function compileInitialPath($column, $alias)
20 20
     {
21
-        return 'cast(' . $this->wrap($column) . ' as text) as ' . $this->wrap($alias);
21
+        return 'cast('.$this->wrap($column).' as text) as '.$this->wrap($alias);
22 22
     }
23 23
 
24 24
     /**
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     public function selectPathList(Builder $query, $expression, $column, $pathSeparator, $listSeparator)
62 62
     {
63 63
         return $query->selectRaw(
64
-            'group_concat(' . $this->wrap($column) . ', ?)',
64
+            'group_concat('.$this->wrap($column).', ?)',
65 65
             [$listSeparator]
66 66
         )->from($expression);
67 67
     }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function compileCycleDetectionInitialSelect(string $column): string
115 115
     {
116
-        return 'false as ' . $this->wrap($column);
116
+        return 'false as '.$this->wrap($column);
117 117
     }
118 118
 
119 119
     /**
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      */
137 137
     public function compileCycleDetectionStopConstraint(string $column): string
138 138
     {
139
-        return 'not ' . $this->wrap($column);
139
+        return 'not '.$this->wrap($column);
140 140
     }
141 141
 
142 142
     /**
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
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     public function addConstraints()
27 27
     {
28 28
         if (static::$constraints) {
29
-            $constraint = function (Builder $query) {
29
+            $constraint = function(Builder $query) {
30 30
                 if ($this->andSelf) {
31 31
                     $query->where($this->getQualifiedLocalKeyName(), '=', $this->getParentKey());
32 32
                 } else {
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
         $keys = $this->getKeys($models, $this->localKey);
55 55
 
56
-        $constraint = function (Builder $query) use ($whereIn, $column, $keys) {
56
+        $constraint = function(Builder $query) use ($whereIn, $column, $keys) {
57 57
             $query->$whereIn($column, $keys);
58 58
         };
59 59
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
         $foreignKey = $this->getForeignKeyName();
103 103
 
104
-        return $results->mapToDictionary(function (Model $result) use ($dictionary, $foreignKey) {
104
+        return $results->mapToDictionary(function(Model $result) use ($dictionary, $foreignKey) {
105 105
             if ($result->hasNestedPath()) {
106 106
                 $key = $dictionary[$result->getFirstPathSegment()]->{$foreignKey};
107 107
             } else {
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             ? $query->getQuery()->from.'.'.$this->localKey
131 131
             : $this->foreignKey;
132 132
 
133
-        $constraint = function (Builder $query) use ($first) {
133
+        $constraint = function(Builder $query) use ($first) {
134 134
             $query->whereColumn(
135 135
                 $first,
136 136
                 '=',
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             ? $table.'.'.$this->localKey
166 166
             : $table.'.'.$this->getForeignKeyName();
167 167
 
168
-        $constraint = function (Builder $query) use ($first) {
168
+        $constraint = function(Builder $query) use ($first) {
169 169
             $query->whereColumn(
170 170
                 $first,
171 171
                 '=',
Please login to merge, or discard this patch.
src/Eloquent/Relations/Graph/Traits/IsRecursiveRelation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
         $keys = $this->getKeys($models, $this->parentKey);
59 59
 
60
-        $constraint = function (Builder $query) use ($whereIn, $column, $keys) {
60
+        $constraint = function(Builder $query) use ($whereIn, $column, $keys) {
61 61
             $query->$whereIn($column, $keys);
62 62
         };
63 63
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     protected function buildDictionary(Collection $results)
82 82
     {
83
-        return $results->mapToDictionary(function (Model $result) {
83
+        return $results->mapToDictionary(function(Model $result) {
84 84
             return [$result->getFirstPathSegment() => $result];
85 85
         })->all();
86 86
     }
Please login to merge, or discard this patch.
src/Query/Grammars/Traits/CompilesMySqlAdjacencyLists.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      */
19 19
     public function compileInitialPath($column, $alias)
20 20
     {
21
-        return 'cast(' . $this->wrap($column) . ' as char(65535)) as ' . $this->wrap($alias);
21
+        return 'cast('.$this->wrap($column).' as char(65535)) as '.$this->wrap($alias);
22 22
     }
23 23
 
24 24
     /**
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     public function selectPathList(Builder $query, $expression, $column, $pathSeparator, $listSeparator)
62 62
     {
63 63
         return $query->selectRaw(
64
-            'group_concat(' . $this->wrap($column) . " separator '$listSeparator')"
64
+            'group_concat('.$this->wrap($column)." separator '$listSeparator')"
65 65
         )->from($expression);
66 66
     }
67 67
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function compileCycleDetectionInitialSelect(string $column): string
150 150
     {
151
-        return 'false as ' . $this->wrap($column);
151
+        return 'false as '.$this->wrap($column);
152 152
     }
153 153
 
154 154
     /**
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      */
172 172
     public function compileCycleDetectionStopConstraint(string $column): string
173 173
     {
174
-        return 'not ' . $this->wrap($column);
174
+        return 'not '.$this->wrap($column);
175 175
     }
176 176
 
177 177
     /**
Please login to merge, or discard this patch.
src/Query/Grammars/SingleStoreGrammar.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
      */
19 19
     public function compileInitialPath($column, $alias)
20 20
     {
21
-        return 'cast(' . $this->wrap($column) . ' as char(8192)) as ' . $this->wrap($alias);
21
+        return 'cast('.$this->wrap($column).' as char(8192)) as '.$this->wrap($alias);
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Eloquent/Relations/Traits/IsOfDescendantsRelation.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public function addConstraints()
35 35
     {
36 36
         if (static::$constraints) {
37
-            $constraint = function (Builder $query) {
37
+            $constraint = function(Builder $query) {
38 38
                 $this->addExpressionWhereConstraints($query);
39 39
             };
40 40
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function addEagerConstraints(array $models)
60 60
     {
61
-        $constraint = function (Builder $query) use ($models) {
61
+        $constraint = function(Builder $query) use ($models) {
62 62
             $this->addEagerExpressionWhereConstraints($query, $models);
63 63
         };
64 64
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 
246 246
         $query->withRecursiveExpression($name, $expression);
247 247
 
248
-        $query->withGlobalScope(get_class($this), function (Builder $query) use ($name) {
248
+        $query->withGlobalScope(get_class($this), function(Builder $query) use ($name) {
249 249
             $query->whereIn(
250 250
                 $this->getExpressionForeignKeyName(),
251 251
                 (new $this->parent())->setTable($name)
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
             $alias = null;
375 375
         }
376 376
 
377
-        $constraint = function (Builder $query) use ($table) {
377
+        $constraint = function(Builder $query) use ($table) {
378 378
             $this->addExistenceExpressionWhereConstraints($query, $table);
379 379
         };
380 380
 
Please login to merge, or discard this patch.
src/IdeHelper/RecursiveRelationsHook.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
         if (in_array(HasRecursiveRelationships::class, $traits)) {
136 136
             foreach (static::$treeRelationships as $relationship) {
137 137
                 $type = $relationship['manyRelation']
138
-                    ? '\\' . TreeCollection::class . '|\\' . $model::class . '[]'
139
-                    : '\\' . $model::class;
138
+                    ? '\\'.TreeCollection::class.'|\\'.$model::class.'[]'
139
+                    : '\\'.$model::class;
140 140
 
141 141
                 $this->addRelationship($command, $relationship, $type);
142 142
             }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
         if (in_array(HasGraphRelationships::class, $traits)) {
146 146
             foreach (static::$graphRelationships as $relationship) {
147
-                $type = '\\' . GraphCollection::class . '|\\' . $model::class . '[]';
147
+                $type = '\\'.GraphCollection::class.'|\\'.$model::class.'[]';
148 148
 
149 149
                 $this->addRelationship($command, $relationship, $type);
150 150
             }
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
         if ($relationship['manyRelation']) {
166 166
             $command->setProperty(
167
-                Str::snake($relationship['name']) . '_count',
167
+                Str::snake($relationship['name']).'_count',
168 168
                 'int',
169 169
                 true,
170 170
                 false,
Please login to merge, or discard this patch.