Passed
Branch master (ee6bc9)
by Jonas
02:31
created
Category
src/HasRelationships.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     {
81 81
         $relatedInstance = $this->newRelatedInstance($related);
82 82
 
83
-        $throughParents = array_map(function ($class) {
83
+        $throughParents = array_map(function($class) {
84 84
             $segments = preg_split('/\s+as\s+/i', $class);
85 85
 
86 86
             $instance = Str::contains($segments[0], '\\') ? new $segments[0] : (new Pivot)->setTable($segments[0]);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         }, $through);
94 94
 
95 95
         foreach (array_merge([$this], $throughParents) as $i => $instance) {
96
-            if (! isset($foreignKeys[$i])) {
96
+            if (!isset($foreignKeys[$i])) {
97 97
                 if ($instance instanceof Pivot) {
98 98
                     $foreignKeys[$i] = ($throughParents[$i] ?? $relatedInstance)->getKeyName();
99 99
                 } else {
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
                 }
102 102
             }
103 103
 
104
-            if (! isset($localKeys[$i])) {
104
+            if (!isset($localKeys[$i])) {
105 105
                 if ($instance instanceof Pivot) {
106 106
                     $localKeys[$i] = ($throughParents[$i] ?? $relatedInstance)->getForeignKey();
107 107
                 } else {
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
      */
227 227
     protected function getProtectedProperty(Relation $relation, $property)
228 228
     {
229
-        $closure = Closure::bind(function (Relation $relation) use ($property) {
229
+        $closure = Closure::bind(function(Relation $relation) use ($property) {
230 230
             return $relation->$property;
231 231
         }, null, $relation);
232 232
 
Please login to merge, or discard this patch.
src/HasManyDeep.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
         $this->query->addSelect($columns);
191 191
 
192
-        return tap($this->query->paginate($perPage, $columns, $pageName, $page), function ($paginator) {
192
+        return tap($this->query->paginate($perPage, $columns, $pageName, $page), function($paginator) {
193 193
             $this->hydrateIntermediateRelations($paginator->items());
194 194
         });
195 195
     }
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 
212 212
         $this->query->addSelect($columns);
213 213
 
214
-        return tap($this->query->simplePaginate($perPage, $columns, $pageName, $page), function ($paginator) {
214
+        return tap($this->query->simplePaginate($perPage, $columns, $pageName, $page), function($paginator) {
215 215
             $this->hydrateIntermediateRelations($paginator->items());
216 216
         });
217 217
     }
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
      */
237 237
     public function chunk($count, callable $callback)
238 238
     {
239
-        return $this->prepareQueryBuilder()->chunk($count, function ($results) use ($callback) {
239
+        return $this->prepareQueryBuilder()->chunk($count, function($results) use ($callback) {
240 240
             $this->hydrateIntermediateRelations($results->all());
241 241
 
242 242
             return $callback($results);
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
         }
455 455
 
456 456
         $this->query->getQuery()->wheres = collect($this->query->getQuery()->wheres)
457
-            ->reject(function ($where) use ($columns) {
457
+            ->reject(function($where) use ($columns) {
458 458
                 return $where['type'] === 'Null' && in_array($where['column'], $columns);
459 459
             })->values()->all();
460 460
 
Please login to merge, or discard this patch.