Skip to content

Commit 2fa54aa

Browse files
committed
feat: PHPStan l5
1 parent 9ce7944 commit 2fa54aa

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

.github/workflows/php-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,5 @@ jobs:
8989
run: composer install
9090

9191
- name: Run PHPStan
92-
run: ./vendor/bin/phpstan analyse lib -l4
92+
run: ./vendor/bin/phpstan analyse lib -l5
9393

lib/FailureHandler.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class FailureHandler
2323
/**
2424
* Create a new failed job on the backend.
2525
*
26-
* @param object $payload The contents of the job that has just failed.
27-
* @param \Exception $exception The exception generated when the job failed to run.
26+
* @param object|array $payload The contents of the job that has just failed.
27+
* @param \Exception $exception The exception generated when the job failed to run.
2828
* @param \Resque\Worker\ResqueWorker $worker Instance of Resque\Worker\ResqueWorker
2929
* that was running this job when it failed.
3030
* @param string $queue The name of the queue that this job was fetched from.
@@ -38,8 +38,8 @@ public static function create($payload, Exception $exception, ResqueWorker $work
3838
/**
3939
* Create a new failed job on the backend from PHP 7 errors.
4040
*
41-
* @param object $payload The contents of the job that has just failed.
42-
* @param \Error $exception The PHP 7 error generated when the job failed to run.
41+
* @param object|array $payload The contents of the job that has just failed.
42+
* @param \Error $exception The PHP 7 error generated when the job failed to run.
4343
* @param \Resque\Worker\ResqueWorker $worker Instance of Resque\Worker\ResqueWorker
4444
* that was running this job when it failed.
4545
* @param string $queue The name of the queue that this job was fetched from.

lib/JobHandler.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ public function __construct($queue, $payload)
5959
/**
6060
* Create a new job and save it to the specified queue.
6161
*
62-
* @param string $queue The name of the queue to place the job in.
63-
* @param class-string $class The name of the class that contains the code to execute the job.
64-
* @param array|null $args Any optional arguments that should be passed when the job is executed.
62+
* @param string $queue The name of the queue to place the job in.
63+
* @param class-string $class The name of the class that contains the code to execute the job.
64+
* @param array|null $args Any optional arguments that should be passed when the job is executed.
6565
* @param boolean $monitor Set to true to be able to monitor the status of a job.
66-
* @param string $id Unique identifier for tracking the job. Generated if not supplied.
67-
* @param string $prefix The prefix needs to be set for the status key
66+
* @param string $id Unique identifier for tracking the job. Generated if not supplied.
67+
* @param string $prefix The prefix needs to be set for the status key
6868
*
6969
* @return string
7070
* @throws \InvalidArgumentException

lib/Redis.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,25 @@
2222
* @method bool sismember(string $set, string $key)
2323
* @method bool del(string $key)
2424
* @method void set(string $key, mixed $value)
25-
* @method bool expire(string $key, string $key2)
25+
* @method bool expire(string $key, int $time)
2626
* @method bool ping(?string $value = null)
2727
* @method bool incrby(string $key, int $increment)
2828
* @method bool decrby(string $key, int $decrement)
2929
* @method bool rpush(string $key, string ...$element)
30-
* @method array blpop(string $key, int $timeout)
31-
* @method array lpop(string $key, int $count = 1)
32-
* @method array rpop(string $key, int $count = 1)
33-
* @method int llen(string $key)
34-
* @method array lrange(string $key, int $start, int $stop)
30+
* @method array blpop(string|array $key, int $timeout)
31+
* @method string|bool lpop(string $key, int $count = 1)
32+
* @method string|bool rpop(string $key, int $count = 1)
3533
* @method int rpoplpush(string $source, string $destination)
36-
* @method void zadd(string $key, int $score, string $member)
34+
* @method int|false llen(string $key)
35+
* @method array lrange(string $key, int $start, int $stop)
36+
* @method void zadd(string $key, int $score, mixed ...$value)
3737
* @method int zcard(string $key)
3838
* @method int sadd(string $key, string $member)
3939
* @method int srem(string $key, string $member)
4040
* @method int lrem(string $key, int $count, string $element)
4141
* @method array keys(string $pattern)
42-
* @method int zrem(string $key, string $member)
43-
* @method array zrangebyscore(string $key, int $min, int $max, bool $scores)
42+
* @method int zrem(string $key, string|int ...$member)
43+
* @method array zrangebyscore(string $key, int|string $min, int|string $max, array $options = [])
4444
4545
*/
4646
class Redis

0 commit comments

Comments
 (0)