Skip to content

Commit 3930b1c

Browse files
Merge pull request #161 from stackkit/feature/PHP-8.4
Fix some PHPStan errors
2 parents 66bc8bd + a616582 commit 3930b1c

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

phpstan.neon

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,3 @@ parameters:
55
paths:
66
- src
77
level: 9
8-
checkMissingIterableValueType: false
9-
ignoreErrors:
10-
- '/Cannot call method when\(\) on mixed/'

src/TaskHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function handle(?string $task = null): void
3838

3939
// We want to catch any errors so we have more fine-grained control over
4040
// how tasks are retried. Cloud Tasks will retry the task if a 5xx status
41-
// is returned. Because we manually manage retries by releaseing jobs,
41+
// is returned. Because we manually manage retries by releasing jobs,
4242
// we never want to return a 5xx status as that will result in duplicate
4343
// job attempts.
4444
rescue(fn () => $this->run($task));

src/Worker.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
*/
2626
class Worker extends LaravelWorker
2727
{
28-
public function process($connectionName, $job, WorkerOptions $options)
28+
public function process($connectionName, $job, WorkerOptions $options): void
2929
{
3030
if ($this->supportsAsyncSignals()) {
3131
$this->listenForSignals();
3232

3333
$this->registerTimeoutHandler($job, $options);
3434
}
3535

36-
return parent::process($connectionName, $job, $options);
36+
parent::process($connectionName, $job, $options);
3737
}
3838

3939
public function kill($status = 0, $options = null): void
@@ -43,10 +43,9 @@ public function kill($status = 0, $options = null): void
4343
// When running tests, we cannot run exit because it will kill the PHPunit process.
4444
// So, to still test that the application has exited, we will simply rely on the
4545
// WorkerStopped event that is fired when the worker is stopped.
46-
if (app()->runningUnitTests()) {
47-
return;
46+
if (! app()->runningUnitTests()) {
47+
exit($status);
4848
}
4949

50-
exit($status);
5150
}
5251
}

0 commit comments

Comments
 (0)