@@ -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 | |
@@ -248,20 +248,20 @@ discard block |
||
248 | 248 | } |
249 | 249 | |
250 | 250 | if ($direction === 'both') { |
251 | - $query->join($name, function (JoinClause $join) use ($joinColumns) { |
|
251 | + $query->join($name, function(JoinClause $join) use ($joinColumns) { |
|
252 | 252 | $join->on($joinColumns['asc'][0], '=', $joinColumns['asc'][1]) |
253 | 253 | ->orOn($joinColumns['desc'][0], '=', $joinColumns['desc'][1]); |
254 | 254 | }); |
255 | 255 | |
256 | 256 | $depth = $this->getDepthName(); |
257 | 257 | |
258 | - $query->where(function (Builder $query) use ($depth, $joinColumns) { |
|
258 | + $query->where(function(Builder $query) use ($depth, $joinColumns) { |
|
259 | 259 | $query->where($depth, '=', 0) |
260 | - ->orWhere(function (Builder $query) use ($depth, $joinColumns) { |
|
260 | + ->orWhere(function(Builder $query) use ($depth, $joinColumns) { |
|
261 | 261 | $query->whereColumn($joinColumns['asc'][0], '=', $joinColumns['asc'][1]) |
262 | 262 | ->where($depth, '<', 0); |
263 | 263 | }) |
264 | - ->orWhere(function (Builder $query) use ($depth, $joinColumns) { |
|
264 | + ->orWhere(function(Builder $query) use ($depth, $joinColumns) { |
|
265 | 265 | $query->whereColumn($joinColumns['desc'][0], '=', $joinColumns['desc'][1]) |
266 | 266 | ->where($depth, '>', 0); |
267 | 267 | }); |