Passed
Push — master ( a6ba49...5acb17 )
by Jonas
18:21 queued 14:48
created
src/Eloquent/Graph/Collection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
         }
26 26
 
27 27
         $parentKeyName = $this->first->relationLoaded('pivot')
28
-            ? 'pivot.' . $this->first()->getParentKeyName()
29
-            : 'pivot_' . $this->first()->getParentKeyName();
28
+            ? 'pivot.'.$this->first()->getParentKeyName()
29
+            : 'pivot_'.$this->first()->getParentKeyName();
30 30
         $localKeyName = $this->first()->getLocalKeyName();
31 31
         $depthName = $this->first()->getDepthName();
32 32
 
Please login to merge, or discard this patch.
src/Eloquent/Traits/HasRecursiveRelationshipScopes.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      */
19 19
     public function scopeTree(Builder $query, $maxDepth = null)
20 20
     {
21
-        $constraint = function (Builder $query) {
21
+        $constraint = function(Builder $query) {
22 22
             $query->isRoot();
23 23
         };
24 24
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * @param int|null $maxDepth
34 34
      * @return \Illuminate\Database\Eloquent\Builder
35 35
      */
36
-    public function scopeTreeOf(Builder $query, callable|Model $constraint, $maxDepth = null)
36
+    public function scopeTreeOf(Builder $query, callable | Model $constraint, $maxDepth = null)
37 37
     {
38 38
         if ($constraint instanceof Model) {
39 39
             $constraint = fn ($query) => $query->whereKey($constraint->getKey());
@@ -291,20 +291,20 @@  discard block
 block discarded – undo
291 291
     protected function addRecursiveQueryJoinsAndConstraints(Builder $query, $direction, $name, array $joinColumns)
292 292
     {
293 293
         if ($direction === 'both') {
294
-            $query->join($name, function (JoinClause $join) use ($joinColumns) {
294
+            $query->join($name, function(JoinClause $join) use ($joinColumns) {
295 295
                 $join->on($joinColumns['asc'][0], '=', $joinColumns['asc'][1])
296 296
                     ->orOn($joinColumns['desc'][0], '=', $joinColumns['desc'][1]);
297 297
             });
298 298
 
299 299
             $depth = $this->getDepthName();
300 300
 
301
-            $query->where(function (Builder  $query) use ($depth, $joinColumns) {
301
+            $query->where(function(Builder  $query) use ($depth, $joinColumns) {
302 302
                 $query->where($depth, '=', 0)
303
-                    ->orWhere(function (Builder $query) use ($depth, $joinColumns) {
303
+                    ->orWhere(function(Builder $query) use ($depth, $joinColumns) {
304 304
                         $query->whereColumn($joinColumns['asc'][0], '=', $joinColumns['asc'][1])
305 305
                             ->where($depth, '<', 0);
306 306
                     })
307
-                    ->orWhere(function (Builder $query) use ($depth, $joinColumns) {
307
+                    ->orWhere(function(Builder $query) use ($depth, $joinColumns) {
308 308
                         $query->whereColumn($joinColumns['desc'][0], '=', $joinColumns['desc'][1])
309 309
                             ->where($depth, '>', 0);
310 310
                     });
Please login to merge, or discard this patch.