Skip to content

Commit e5d53f5

Browse files
committed
Fix PHPStan booleanAnd.leftAlwaysTrue errors
- RedisQueue: Remove redundant $this->container check (already non-nullable) - ThrottlesExceptions: Fix PHPDoc @var callable to @var ?callable for $reportCallback and $whenCallback (properties can be null)
1 parent b927c71 commit e5d53f5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/horizon/src/RedisQueue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function deleteAndRelease(string $queue, RedisJob $job, DateInterval|Date
150150
*/
151151
protected function event(string $queue, mixed $event): void
152152
{
153-
if ($this->container && $this->container->has(Dispatcher::class)) {
153+
if ($this->container->has(Dispatcher::class)) {
154154
$queue = Str::replaceFirst('queues:', '', $queue);
155155

156156
$this->container->get(Dispatcher::class)->dispatch(

src/queue/src/Middleware/ThrottlesExceptions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ class ThrottlesExceptions
2828
/**
2929
* The callback that determines if the exception should be reported.
3030
*
31-
* @var callable
31+
* @var ?callable
3232
*/
3333
protected $reportCallback;
3434

3535
/**
3636
* The callback that determines if rate limiting should apply.
3737
*
38-
* @var callable
38+
* @var ?callable
3939
*/
4040
protected $whenCallback;
4141

0 commit comments

Comments
 (0)