mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-01 19:00:20 +02:00
Fix issues
This commit is contained in:
@@ -30,7 +30,7 @@ use Monolog\Logger;
|
||||
*/
|
||||
class RedisHandler extends AbstractProcessingHandler
|
||||
{
|
||||
/** @var \Predis\Client|\Redis */
|
||||
/** @var \Predis\Client<\Predis\Client>|\Redis */
|
||||
private $redisClient;
|
||||
/** @var string */
|
||||
private $redisKey;
|
||||
@@ -38,7 +38,7 @@ class RedisHandler extends AbstractProcessingHandler
|
||||
protected $capSize;
|
||||
|
||||
/**
|
||||
* @param \Predis\Client|\Redis $redis The redis instance
|
||||
* @param \Predis\Client<\Predis\Client>|\Redis $redis The redis instance
|
||||
* @param string $key The key name to push records to
|
||||
* @param int $capSize Number of entries to limit list size to, 0 = unlimited
|
||||
*/
|
||||
|
@@ -28,13 +28,13 @@ use Monolog\Logger;
|
||||
*/
|
||||
class RedisPubSubHandler extends AbstractProcessingHandler
|
||||
{
|
||||
/** @var \Predis\Client|\Redis */
|
||||
/** @var \Predis\Client<\Predis\Client>|\Redis */
|
||||
private $redisClient;
|
||||
/** @var string */
|
||||
private $channelKey;
|
||||
|
||||
/**
|
||||
* @param \Predis\Client|\Redis $redis The redis instance
|
||||
* @param \Predis\Client<\Predis\Client>|\Redis $redis The redis instance
|
||||
* @param string $key The channel key to publish records to
|
||||
*/
|
||||
public function __construct($redis, string $key, $level = Logger::DEBUG, bool $bubble = true)
|
||||
|
@@ -212,7 +212,7 @@ class StreamHandler extends AbstractProcessingHandler
|
||||
set_error_handler([$this, 'customErrorHandler']);
|
||||
$status = mkdir($dir, 0777, true);
|
||||
restore_error_handler();
|
||||
if (false === $status && !is_dir($dir) && strpos($this->errorMessage, 'File exists') !== false) {
|
||||
if (false === $status && !is_dir($dir) && strpos((string) $this->errorMessage, 'File exists') === false) {
|
||||
throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and it could not be created: '.$this->errorMessage, $dir));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user