Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update PHPStan lvl to 5 #91

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

SMillerDev
Copy link
Contributor

@SMillerDev SMillerDev commented Mar 5, 2025

This updates the PHPStan check to lvl 5. There are still some unresolved issues and the method types are based on the redis docs so might not be complete.

@SMillerDev SMillerDev force-pushed the feat/general/phpstan_4 branch from 7dfe886 to 9ce7944 Compare March 5, 2025 11:04
@SMillerDev SMillerDev changed the title feat: update PHPStan lvl to 4 feat: update PHPStan lvl to 5 Mar 5, 2025
Copy link
Collaborator

@pprkut pprkut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a couple of type changes you can have a look at #92. Or wait until that one is in. It should make a couple things easier.

Comment on lines +19 to +43
* @method string get(string $key)
* @method bool exists(string $key)
* @method array smembers(string $set)
* @method bool sismember(string $set, string $key)
* @method bool del(string $key)
* @method void set(string $key, mixed $value)
* @method bool expire(string $key, int $time)
* @method bool ping(?string $value = null)
* @method bool incrby(string $key, int $increment)
* @method bool decrby(string $key, int $decrement)
* @method bool rpush(string $key, string ...$element)
* @method array blpop(string|array $key, int $timeout)
* @method string|bool lpop(string $key, int $count = 1)
* @method string|bool rpop(string $key, int $count = 1)
* @method int rpoplpush(string $source, string $destination)
* @method int|false llen(string $key)
* @method array lrange(string $key, int $start, int $stop)
* @method void zadd(string $key, int $score, mixed ...$value)
* @method int zcard(string $key)
* @method int sadd(string $key, string $member)
* @method int srem(string $key, string $member)
* @method int lrem(string $key, int $count, string $element)
* @method array keys(string $pattern)
* @method int zrem(string $key, string|int ...$member)
* @method array zrangebyscore(string $key, int|string $min, int|string $max, array $options = [])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a list sourced from Credis that I put in #94. I think that one is slightly more accurate, considering Credis is the main supported driver

@@ -97,7 +97,8 @@ public function isTracking()
/**
* Update the status indicator for the current job with a new status.
*
* @param int The status of the job (see constants in Resque\Job\Status)
* @param int $status The status of the job (see constants in Resque\Job\Status)
* @param int|null $result The result of the job
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has to be mixed. $result can be pretty much anything returned from a Job's perform() method

Comment on lines 37 to 40
/**
* @var object|\Resque\Job\JobInterface Instance of the class performing work for this job.
* @var object|\Resque\Job\JobInterface|null Instance of the class performing work for this job.
*/
private $instance;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be nullable. Where would the NULL come from?

* @param string $prefix The prefix needs to be set for the status key
* @param string $queue The name of the queue to place the job in.
* @param class-string $class The name of the class that contains the code to execute the job.
* @param array|null $args Any optional arguments that should be passed when the job is executed.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be null. It should be an empty array for optional cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants