@@ -17,14 +17,14 @@ discard block |
||
17 | 17 | public $hasParent = true; |
18 | 18 | public static function bootHasParent() |
19 | 19 | { |
20 | - static::creating(function ($model) { |
|
20 | + static::creating(function($model) { |
|
21 | 21 | if ($model->parentHasHasChildrenTrait()) { |
22 | 22 | $model->forceFill( |
23 | 23 | [$model->getInheritanceColumn() => $model->classToAlias(get_class($model))] |
24 | 24 | ); |
25 | 25 | } |
26 | 26 | }); |
27 | - static::addGlobalScope(function ($query) { |
|
27 | + static::addGlobalScope(function($query) { |
|
28 | 28 | $instance = new static; |
29 | 29 | if ($instance->parentHasHasChildrenTrait()) { |
30 | 30 | $query->where($instance->getTable().'.'.$instance->getInheritanceColumn(), $instance->classToAlias(get_class($instance))); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | } |
38 | 38 | public function getTable() |
39 | 39 | { |
40 | - if (! isset($this->table)) { |
|
40 | + if (!isset($this->table)) { |
|
41 | 41 | return str_replace('\\', '', Str::snake(Str::plural(class_basename($this->getParentClass())))); |
42 | 42 | } |
43 | 43 | return $this->table; |