@@ -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 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | protected function addCancel(Builder $builder) |
| 69 | 69 | { |
| 70 | - $builder->macro('cancel', function (Builder $builder) { |
|
| 70 | + $builder->macro('cancel', function(Builder $builder) { |
|
| 71 | 71 | $column = $this->getCancelledAtColumn($builder); |
| 72 | 72 | |
| 73 | 73 | return $builder->update([ |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | protected function addUnCancel(Builder $builder) |
| 86 | 86 | { |
| 87 | - $builder->macro('unCancel', function (Builder $builder) { |
|
| 87 | + $builder->macro('unCancel', function(Builder $builder) { |
|
| 88 | 88 | $builder->withCancelled(); |
| 89 | 89 | |
| 90 | 90 | $column = $this->getCancelledAtColumn($builder); |
@@ -103,8 +103,8 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | protected function addWithCancelled(Builder $builder) |
| 105 | 105 | { |
| 106 | - $builder->macro('withCancelled', function (Builder $builder, $withCancelled = true) { |
|
| 107 | - if (! $withCancelled) { |
|
| 106 | + $builder->macro('withCancelled', function(Builder $builder, $withCancelled = true) { |
|
| 107 | + if (!$withCancelled) { |
|
| 108 | 108 | return $builder->withoutCancelled(); |
| 109 | 109 | } |
| 110 | 110 | |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | */ |
| 121 | 121 | protected function addWithoutCancelled(Builder $builder) |
| 122 | 122 | { |
| 123 | - $builder->macro('withoutCancelled', function (Builder $builder) { |
|
| 123 | + $builder->macro('withoutCancelled', function(Builder $builder) { |
|
| 124 | 124 | $model = $builder->getModel(); |
| 125 | 125 | |
| 126 | 126 | return $builder->withoutGlobalScope($this)->whereNull( |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | */ |
| 138 | 138 | protected function addOnlyCancelled(Builder $builder) |
| 139 | 139 | { |
| 140 | - $builder->macro('onlyCancelled', function (Builder $builder) { |
|
| 140 | + $builder->macro('onlyCancelled', function(Builder $builder) { |
|
| 141 | 141 | $model = $builder->getModel(); |
| 142 | 142 | |
| 143 | 143 | $builder->withoutGlobalScope($this)->where($model->getQualifiedCancelledAtColumn(), '<=', Carbon::now()); |