Passed
Push — master ( 6cf215...65a336 )
by Jonas
12:16
created
src/HasManyDeep.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 
239 239
         $this->query->addSelect($columns);
240 240
 
241
-        return tap($this->query->paginate($perPage, $columns, $pageName, $page), function (Paginator $paginator) {
241
+        return tap($this->query->paginate($perPage, $columns, $pageName, $page), function(Paginator $paginator) {
242 242
             $this->hydrateIntermediateRelations($paginator->items());
243 243
         });
244 244
     }
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 
262 262
         $this->query->addSelect($columns);
263 263
 
264
-        return tap($this->query->simplePaginate($perPage, $columns, $pageName, $page), function (Paginator $paginator) {
264
+        return tap($this->query->simplePaginate($perPage, $columns, $pageName, $page), function(Paginator $paginator) {
265 265
             $this->hydrateIntermediateRelations($paginator->items());
266 266
         });
267 267
     }
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 
285 285
         $this->query->addSelect($columns);
286 286
 
287
-        return tap($this->query->cursorPaginate($perPage, $columns, $cursorName, $cursor), function (CursorPaginator $paginator) {
287
+        return tap($this->query->cursorPaginate($perPage, $columns, $cursorName, $cursor), function(CursorPaginator $paginator) {
288 288
             $this->hydrateIntermediateRelations($paginator->items());
289 289
         });
290 290
     }
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
         if ($this->customThroughKeyCallback) {
307 307
             $columns[] = ($this->customThroughKeyCallback)($alias);
308 308
         } else {
309
-            $columns[] = $this->getQualifiedFirstKeyName() . " as $alias";
309
+            $columns[] = $this->getQualifiedFirstKeyName()." as $alias";
310 310
         }
311 311
 
312 312
         if ($this->hasLeadingCompositeKey()) {
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
      */
329 329
     public function chunk($count, callable $callback)
330 330
     {
331
-        return $this->prepareQueryBuilder()->chunk($count, function (Collection $results) use ($callback) {
331
+        return $this->prepareQueryBuilder()->chunk($count, function(Collection $results) use ($callback) {
332 332
             $this->hydrateIntermediateRelations($results->all());
333 333
 
334 334
             return $callback($results);
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
                     );
360 360
                 }
361 361
 
362
-                $table = $throughParent->getTable() . ' as ' . $this->getRelationCountHash();
362
+                $table = $throughParent->getTable().' as '.$this->getRelationCountHash();
363 363
 
364 364
                 $throughParent->setTable($table);
365 365
 
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
         }
435 435
 
436 436
         foreach ($columns as $column) {
437
-            $this->query->withoutGlobalScope(__CLASS__ . ":$column");
437
+            $this->query->withoutGlobalScope(__CLASS__.":$column");
438 438
         }
439 439
 
440 440
         return $this;
Please login to merge, or discard this patch.
src/Eloquent/Traits/ConcatenatesRelationships.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                 $related = get_class($relation->getRelated());
141 141
 
142 142
                 if ((new $related())->getTable() !== $relation->getRelated()->getTable()) {
143
-                    $related .= ' from ' . $relation->getRelated()->getTable();
143
+                    $related .= ' from '.$relation->getRelated()->getTable();
144 144
                 }
145 145
             } else {
146 146
                 $through[] = $this->hasOneOrManyThroughParent($relation, $relations[$i + 1]);
@@ -177,11 +177,11 @@  discard block
 block discarded – undo
177 177
         if (is_array($relation->getOwnerKeyName())) {
178 178
             // https://github.com/topclaudy/compoships
179 179
             $foreignKeys[] = new CompositeKey(
180
-                ...(array)$relation->getOwnerKeyName()
180
+                ...(array) $relation->getOwnerKeyName()
181 181
             );
182 182
 
183 183
             $localKeys[] = new CompositeKey(
184
-                ...(array)$relation->getForeignKeyName()
184
+                ...(array) $relation->getForeignKeyName()
185 185
             );
186 186
         } else {
187 187
             $foreignKeys[] = $relation->getOwnerKeyName();
@@ -236,11 +236,11 @@  discard block
 block discarded – undo
236 236
         if (is_array($relation->getForeignKeyName())) {
237 237
             // https://github.com/topclaudy/compoships
238 238
             $foreignKeys[] = new CompositeKey(
239
-                ...(array)$relation->getForeignKeyName()
239
+                ...(array) $relation->getForeignKeyName()
240 240
             );
241 241
 
242 242
             $localKeys[] = new CompositeKey(
243
-                ...(array)$relation->getLocalKeyName()
243
+                ...(array) $relation->getLocalKeyName()
244 244
             );
245 245
         } else {
246 246
             $foreignKeys[] = $relation->getForeignKeyName();
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 
353 353
         foreach ($classes as $class) {
354 354
             if ($relation instanceof $class) {
355
-                return 'hasOneOrManyDeepFrom' . class_basename($class);
355
+                return 'hasOneOrManyDeepFrom'.class_basename($class);
356 356
             }
357 357
         }
358 358
 
@@ -371,11 +371,11 @@  discard block
 block discarded – undo
371 371
         $through = get_class($relation->getRelated());
372 372
 
373 373
         if ($relation instanceof ConcatenableRelation && method_exists($relation, 'getTableForDeepRelationship')) {
374
-            return $through . ' from ' . $relation->getTableForDeepRelationship();
374
+            return $through.' from '.$relation->getTableForDeepRelationship();
375 375
         }
376 376
 
377 377
         if ((new $through())->getTable() !== $relation->getRelated()->getTable()) {
378
-            $through .= ' from ' . $relation->getRelated()->getTable();
378
+            $through .= ' from '.$relation->getRelated()->getTable();
379 379
         }
380 380
 
381 381
         if (get_class($relation->getRelated()) === get_class($successor->getParent())) {
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
             $segments = explode(' as ', $table);
385 385
 
386 386
             if (isset($segments[1])) {
387
-                $through .= ' as ' . $segments[1];
387
+                $through .= ' as '.$segments[1];
388 388
             }
389 389
         }
390 390
 
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
         ?callable $customThroughKeyCallback,
408 408
         ?callable $customEagerConstraintsCallback,
409 409
         ?callable $customEagerMatchingCallback
410
-    ): HasManyDeep|HasOneDeep {
410
+    ): HasManyDeep | HasOneDeep {
411 411
         $relation->withPostGetCallbacks($postGetCallbacks);
412 412
 
413 413
         if ($customThroughKeyCallback) {
@@ -461,11 +461,11 @@  discard block
 block discarded – undo
461 461
     protected function addConstraintsToHasOneOrManyDeepRelationship(
462 462
         HasManyDeep $deepRelation,
463 463
         array $relations
464
-    ): HasManyDeep|HasOneDeep {
464
+    ): HasManyDeep | HasOneDeep {
465 465
         $relations = $this->normalizeVariadicRelations($relations);
466 466
 
467 467
         foreach ($relations as $i => $relation) {
468
-            $relationWithoutConstraints = Relation::noConstraints(function () use ($relation) {
468
+            $relationWithoutConstraints = Relation::noConstraints(function() use ($relation) {
469 469
                 return $relation();
470 470
             });
471 471
 
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
                 $deepRelation->withTrashed($deletedAtColumn);
515 515
             }
516 516
 
517
-            if (str_starts_with($scope, HasManyDeep::class . ':')) {
517
+            if (str_starts_with($scope, HasManyDeep::class.':')) {
518 518
                 $deletedAtColumn = explode(':', $scope)[1];
519 519
 
520 520
                 $deepRelation->withTrashed($deletedAtColumn);
Please login to merge, or discard this patch.
src/Eloquent/Relations/Traits/JoinsThroughParents.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
             $query->join(
45 45
                 $table,
46
-                function (JoinClause $join) use ($joins) {
46
+                function(JoinClause $join) use ($joins) {
47 47
                     foreach ($joins as [$first, $second]) {
48 48
                         $join->on($first, '=', $second);
49 49
                     }
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
         }
53 53
 
54 54
         if ($this->throughParentInstanceSoftDeletes($throughParent)) {
55
-            $column= $throughParent->getQualifiedDeletedAtColumn();
55
+            $column = $throughParent->getQualifiedDeletedAtColumn();
56 56
 
57
-            $query->withGlobalScope(__CLASS__ . ":$column", function (Builder $query) use ($column) {
57
+            $query->withGlobalScope(__CLASS__.":$column", function(Builder $query) use ($column) {
58 58
                 $query->whereNull($column);
59 59
             });
60 60
         }
Please login to merge, or discard this patch.