@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | protected function addCancel(Builder $builder) |
67 | 67 | { |
68 | - $builder->macro('cancel', function (Builder $builder) { |
|
68 | + $builder->macro('cancel', function(Builder $builder) { |
|
69 | 69 | $column = $this->getCancelledAtColumn($builder); |
70 | 70 | |
71 | 71 | return $builder->update([ |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | protected function addUnCancel(Builder $builder) |
84 | 84 | { |
85 | - $builder->macro('unCancel', function (Builder $builder) { |
|
85 | + $builder->macro('unCancel', function(Builder $builder) { |
|
86 | 86 | $builder->withCancelled(); |
87 | 87 | |
88 | 88 | $column = $this->getCancelledAtColumn($builder); |
@@ -101,8 +101,8 @@ discard block |
||
101 | 101 | */ |
102 | 102 | protected function addWithCancelled(Builder $builder) |
103 | 103 | { |
104 | - $builder->macro('withCancelled', function (Builder $builder, $withCancelled = true) { |
|
105 | - if (! $withCancelled) { |
|
104 | + $builder->macro('withCancelled', function(Builder $builder, $withCancelled = true) { |
|
105 | + if (!$withCancelled) { |
|
106 | 106 | return $builder->withoutCancelled(); |
107 | 107 | } |
108 | 108 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | protected function addWithoutCancelled(Builder $builder) |
120 | 120 | { |
121 | - $builder->macro('withoutCancelled', function (Builder $builder) { |
|
121 | + $builder->macro('withoutCancelled', function(Builder $builder) { |
|
122 | 122 | $model = $builder->getModel(); |
123 | 123 | |
124 | 124 | return $builder->withoutGlobalScope($this)->whereNull( |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | */ |
136 | 136 | protected function addOnlyCancelled(Builder $builder) |
137 | 137 | { |
138 | - $builder->macro('onlyCancelled', function (Builder $builder) { |
|
138 | + $builder->macro('onlyCancelled', function(Builder $builder) { |
|
139 | 139 | $model = $builder->getModel(); |
140 | 140 | |
141 | 141 | $builder->withoutGlobalScope($this)->whereNotNull( |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function initializeCancellable(): void |
41 | 41 | { |
42 | - if (! isset($this->casts[$this->getCancelledAtColumn()])) { |
|
42 | + if (!isset($this->casts[$this->getCancelledAtColumn()])) { |
|
43 | 43 | $this->casts[$this->getCancelledAtColumn()] = 'datetime'; |
44 | 44 | } |
45 | 45 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | // If the model doesn't exist, there is nothing to cancel. |
63 | - if (! $this->exists) { |
|
63 | + if (!$this->exists) { |
|
64 | 64 | return; |
65 | 65 | } |
66 | 66 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | $this->{$this->getCancelledAtColumn()} = $time; |
100 | 100 | |
101 | - if ($this->usesTimestamps() && ! is_null($this->getUpdatedAtColumn())) { |
|
101 | + if ($this->usesTimestamps() && !is_null($this->getUpdatedAtColumn())) { |
|
102 | 102 | $this->{$this->getUpdatedAtColumn()} = $time; |
103 | 103 | |
104 | 104 | $columns[$this->getUpdatedAtColumn()] = $this->fromDateTime($time); |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | protected function configureMacros(): void |
27 | 27 | { |
28 | - Blueprint::macro('cancelledAt', function ($column = 'cancelled_at', $precision = 0) { |
|
28 | + Blueprint::macro('cancelledAt', function($column = 'cancelled_at', $precision = 0) { |
|
29 | 29 | return $this->timestamp($column, $precision)->nullable(); |
30 | 30 | }); |
31 | 31 | } |