@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | $this->{$this->getActivatedAtColumn()} = $time = $this->freshTimestamp(); |
78 | 78 | |
79 | - $query->update([ $this->getActivatedAtColumn() => $this->fromDateTime($time) ]); |
|
79 | + $query->update([$this->getActivatedAtColumn() => $this->fromDateTime($time)]); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | $this->{$this->getActivatedAtColumn()} = null; |
96 | 96 | |
97 | - $query->update([ $this->getActivatedAtColumn() => null ]); |
|
97 | + $query->update([$this->getActivatedAtColumn() => null]); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | /** |
65 | 65 | * Activate the given model instance. |
66 | 66 | * |
67 | - * @return void |
|
67 | + * @return false|null |
|
68 | 68 | */ |
69 | 69 | public function activate() |
70 | 70 | { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | /** |
83 | 83 | * Deactivate the given model instance. |
84 | 84 | * |
85 | - * @return void |
|
85 | + * @return false|null |
|
86 | 86 | */ |
87 | 87 | public function deactivate() |
88 | 88 | { |
@@ -29,15 +29,15 @@ discard block |
||
29 | 29 | |
30 | 30 | public function extend(Builder $builder) |
31 | 31 | { |
32 | - foreach ( $this->extensions as $extension ) { |
|
32 | + foreach ($this->extensions as $extension) { |
|
33 | 33 | $this->{"add{$extension}"}($builder); |
34 | 34 | } |
35 | 35 | } |
36 | 36 | |
37 | 37 | public function addWithDeactivated(Builder $builder) |
38 | 38 | { |
39 | - $builder->macro('withDeactivated', function (Builder $builder, $withDeactivated = true) { |
|
40 | - if ( !$withDeactivated ) { |
|
39 | + $builder->macro('withDeactivated', function(Builder $builder, $withDeactivated = true) { |
|
40 | + if (!$withDeactivated) { |
|
41 | 41 | return $builder->withoutDeactivated(); |
42 | 42 | } |
43 | 43 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | public function addWithoutDeactivated(Builder $builder) |
49 | 49 | { |
50 | - $builder->macro('withoutDeactivated', function (Builder $builder) { |
|
50 | + $builder->macro('withoutDeactivated', function(Builder $builder) { |
|
51 | 51 | $model = $builder->getModel(); |
52 | 52 | |
53 | 53 | $builder->withoutGlobalScope($this)->whereNotNull( |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | public function addOnlyDeactivated(Builder $builder) |
62 | 62 | { |
63 | - $builder->macro('onlyDeactivated', function (Builder $builder) { |
|
63 | + $builder->macro('onlyDeactivated', function(Builder $builder) { |
|
64 | 64 | $model = $builder->getModel(); |
65 | 65 | |
66 | 66 | $builder->withoutGlobalScope($this)->whereNull( |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | public function addDeactivate(Builder $builder) |
75 | 75 | { |
76 | - $builder->macro('deactivate', function (Builder $builder) { |
|
76 | + $builder->macro('deactivate', function(Builder $builder) { |
|
77 | 77 | $model = $builder->getModel(); |
78 | 78 | |
79 | 79 | $builder->withDeactivated(); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | public function addActivate(Builder $builder) |
86 | 86 | { |
87 | - $builder->macro('activate', function (Builder $builder) { |
|
87 | + $builder->macro('activate', function(Builder $builder) { |
|
88 | 88 | $model = $this->getModel(); |
89 | 89 | |
90 | 90 | $query = $model->newQuery()->where($model->getKeyName(), $model->getKey()); |