@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | $addresses = Arr::wrap($addresses); |
| 93 | 93 | |
| 94 | - return $this->then(function (MailerInterface $mailer) use ($addresses, $onlyIfOutputExists) { |
|
| 94 | + return $this->then(function(MailerInterface $mailer) use ($addresses, $onlyIfOutputExists) { |
|
| 95 | 95 | $this->emailOutput($mailer, $addresses, $onlyIfOutputExists); |
| 96 | 96 | }); |
| 97 | 97 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | |
| 120 | 120 | $addresses = Arr::wrap($addresses); |
| 121 | 121 | |
| 122 | - return $this->onFailure(function (MailerInterface $mailer) use ($addresses) { |
|
| 122 | + return $this->onFailure(function(MailerInterface $mailer) use ($addresses) { |
|
| 123 | 123 | $this->emailOutput($mailer, $addresses, false); |
| 124 | 124 | }); |
| 125 | 125 | } |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | */ |
| 158 | 158 | public function onSuccess(Closure $callback): self |
| 159 | 159 | { |
| 160 | - return $this->then(function (ContainerInterface $container) use ($callback) { |
|
| 160 | + return $this->then(function(ContainerInterface $container) use ($callback) { |
|
| 161 | 161 | if ($this->exitCode === EXIT_SUCCESS) { |
| 162 | 162 | $container->call($callback); |
| 163 | 163 | } |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | */ |
| 170 | 170 | public function onFailure(Closure $callback): self |
| 171 | 171 | { |
| 172 | - return $this->then(function (ContainerInterface $container) use ($callback) { |
|
| 172 | + return $this->then(function(ContainerInterface $container) use ($callback) { |
|
| 173 | 173 | if ($this->exitCode !== EXIT_SUCCESS) { |
| 174 | 174 | $container->call($callback, array_filter([$this->exception])); |
| 175 | 175 | } |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | protected function ensureOutputIsBeingCaptured() |
| 259 | 259 | { |
| 260 | 260 | if (is_null($this->output) || $this->output == $this->getDefaultOutput()) { |
| 261 | - $this->sendOutputTo(storage_path('logs/schedule-'.sha1($this->mutexName()).'.log')); |
|
| 261 | + $this->sendOutputTo(storage_path('logs/schedule-' . sha1($this->mutexName()) . '.log')); |
|
| 262 | 262 | } |
| 263 | 263 | } |
| 264 | 264 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | public function __construct(protected string $type, protected mixed $action, protected array $parameters = []) |
| 81 | 81 | { |
| 82 | - if (! in_array($type, $this->types, true)) { |
|
| 82 | + if (!in_array($type, $this->types, true)) { |
|
| 83 | 83 | throw TasksException::invalidTaskType($type); |
| 84 | 84 | } |
| 85 | 85 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | public function run() |
| 123 | 123 | { |
| 124 | 124 | $method = 'run' . ucfirst($this->type); |
| 125 | - if (! method_exists($this, $method)) { |
|
| 125 | + if (!method_exists($this, $method)) { |
|
| 126 | 126 | throw TasksException::invalidTaskType($this->type); |
| 127 | 127 | } |
| 128 | 128 | |
@@ -137,12 +137,12 @@ discard block |
||
| 137 | 137 | $cron = service('cronExpression')->setTimezone($this->timezone); |
| 138 | 138 | |
| 139 | 139 | // Autoriser le réglage des heures pendant les tests |
| 140 | - if (! empty($testTime)) { |
|
| 140 | + if (!empty($testTime)) { |
|
| 141 | 141 | $cron->testTime($testTime); |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | // Sommes-nous limités aux environnements? |
| 145 | - if (! $this->runsInEnvironment(environment())) { |
|
| 145 | + if (!$this->runsInEnvironment(environment())) { |
|
| 146 | 146 | return false; |
| 147 | 147 | } |
| 148 | 148 | |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | */ |
| 245 | 245 | protected function runEvent(): bool |
| 246 | 246 | { |
| 247 | - return ! (false === service('event')->emit($this->getAction())); |
|
| 247 | + return !(false === service('event')->emit($this->getAction())); |
|
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | /** |