@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | */ |
18 | 18 | public function scopeTree(Builder $query, $maxDepth = null) |
19 | 19 | { |
20 | - $constraint = function (Builder $query) { |
|
20 | + $constraint = function(Builder $query) { |
|
21 | 21 | $query->isRoot(); |
22 | 22 | }; |
23 | 23 | |
@@ -268,20 +268,20 @@ discard block |
||
268 | 268 | protected function addRecursiveQueryJoinsAndConstraints(Builder $query, $direction, $name, array $joinColumns) |
269 | 269 | { |
270 | 270 | if ($direction === 'both') { |
271 | - $query->join($name, function (JoinClause $join) use ($joinColumns) { |
|
271 | + $query->join($name, function(JoinClause $join) use ($joinColumns) { |
|
272 | 272 | $join->on($joinColumns['asc'][0], '=', $joinColumns['asc'][1]) |
273 | 273 | ->orOn($joinColumns['desc'][0], '=', $joinColumns['desc'][1]); |
274 | 274 | }); |
275 | 275 | |
276 | 276 | $depth = $this->getDepthName(); |
277 | 277 | |
278 | - $query->where(function (Builder $query) use ($depth, $joinColumns) { |
|
278 | + $query->where(function(Builder $query) use ($depth, $joinColumns) { |
|
279 | 279 | $query->where($depth, '=', 0) |
280 | - ->orWhere(function (Builder $query) use ($depth, $joinColumns) { |
|
280 | + ->orWhere(function(Builder $query) use ($depth, $joinColumns) { |
|
281 | 281 | $query->whereColumn($joinColumns['asc'][0], '=', $joinColumns['asc'][1]) |
282 | 282 | ->where($depth, '<', 0); |
283 | 283 | }) |
284 | - ->orWhere(function (Builder $query) use ($depth, $joinColumns) { |
|
284 | + ->orWhere(function(Builder $query) use ($depth, $joinColumns) { |
|
285 | 285 | $query->whereColumn($joinColumns['desc'][0], '=', $joinColumns['desc'][1]) |
286 | 286 | ->where($depth, '>', 0); |
287 | 287 | }); |