diff --git a/lib/Resque/Redis.php b/lib/Resque/Redis.php index 8f80c57..6af922e 100644 --- a/lib/Resque/Redis.php +++ b/lib/Resque/Redis.php @@ -1,6 +1,6 @@ @@ -113,7 +113,7 @@ public static function prefix($namespace) * @param string|array $server A DSN or array * @param int $database A database number to select. However, if we find a valid database number in the DSN the * DSN-supplied value will be used instead and this parameter is ignored. - * @param null|\Redis|\RedisCluster $client Optional Credis_Cluster or Credis_Client instance instantiated by you + * @param null|\Redis|\RedisCluster $client Optional {@see RedisCluster} or {@see Redis} instantiated by you */ public function __construct($server, $database = null, $client = null) { diff --git a/lib/Resque/Worker.php b/lib/Resque/Worker.php index e8b6476..b542976 100644 --- a/lib/Resque/Worker.php +++ b/lib/Resque/Worker.php @@ -179,9 +179,9 @@ public function work($interval = Resque::DEFAULT_INTERVAL, $blocking = false) // is redis still alive? try { if (Resque::redis()->ping() === false) { - throw new CredisException('redis ping() failed'); + throw new \RedisException('redis ping() failed'); } - } catch (CredisException $e) { + } catch (\RedisException $e) { $this->logger->log(Psr\Log\LogLevel::ERROR, 'redis went away. trying to reconnect'); Resque::$redis = null; usleep($interval * 1000000); diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index d398a9f..50e5ba6 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -845,21 +845,11 @@ parameters: count: 2 path: lib/Resque/Worker.php - - - message: "#^Caught class CredisException not found\\.$#" - count: 1 - path: lib/Resque/Worker.php - - message: "#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#" count: 3 path: lib/Resque/Worker.php - - - message: "#^Instantiated class CredisException not found\\.$#" - count: 1 - path: lib/Resque/Worker.php - - message: "#^Method Resque_Worker\\:\\:__construct\\(\\) has parameter \\$queues with no value type specified in iterable type array\\.$#" count: 1 @@ -1085,11 +1075,6 @@ parameters: count: 1 path: lib/Resque/Worker.php - - - message: "#^Throwing object of an unknown class CredisException\\.$#" - count: 1 - path: lib/Resque/Worker.php - - message: "#^Unsafe access to private property Resque_Worker\\:\\:\\$processPrefix through static\\:\\:\\.$#" count: 1