@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | { |
199 | 199 | static::$branchOrder = array_flip(Arr::flatten($order)); |
200 | 200 | |
201 | - static::$branchOrder = array_map(function ($item) { |
|
201 | + static::$branchOrder = array_map(function($item) { |
|
202 | 202 | return ++$item; |
203 | 203 | }, static::$branchOrder); |
204 | 204 | } |
@@ -239,9 +239,9 @@ discard block |
||
239 | 239 | * @param string $space |
240 | 240 | * @return array |
241 | 241 | */ |
242 | - public static function selectOptions(\Closure $closure = null, $rootText = 'ROOT',array $nodes = [], $parentId = 0, $prefix = '', $space = ' ') |
|
242 | + public static function selectOptions(\Closure $closure = null, $rootText = 'ROOT', array $nodes = [], $parentId = 0, $prefix = '', $space = ' ') |
|
243 | 243 | { |
244 | - $options = (new static())->withQuery($closure)->buildSelectOptions($nodes,$parentId,$prefix,$space); |
|
244 | + $options = (new static())->withQuery($closure)->buildSelectOptions($nodes, $parentId, $prefix, $space); |
|
245 | 245 | |
246 | 246 | return collect($options)->prepend($rootText, 0)->all(); |
247 | 247 | } |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | { |
303 | 303 | parent::boot(); |
304 | 304 | |
305 | - static::saving(function (Model $branch) { |
|
305 | + static::saving(function(Model $branch) { |
|
306 | 306 | $parentColumn = $branch->getParentColumn(); |
307 | 307 | |
308 | 308 | if (Request::has($parentColumn) && Request::input($parentColumn) == $branch->getKey()) { |