mirror of
https://github.com/Seldaek/monolog.git
synced 2025-09-01 17:12:41 +02:00
Last phpstan fixes
This commit is contained in:
@@ -172,11 +172,14 @@ class NormalizerFormatter implements FormatterInterface
|
||||
}
|
||||
|
||||
if ($data instanceof \JsonSerializable) {
|
||||
/** @var null|scalar|array<array|scalar|null> $value */
|
||||
$value = $data->jsonSerialize();
|
||||
} elseif (method_exists($data, '__toString')) {
|
||||
/** @var string $value */
|
||||
$value = $data->__toString();
|
||||
} else {
|
||||
// the rest is normalized by json encoding and decoding it
|
||||
/** @var null|scalar|array<array|scalar|null> $value */
|
||||
$value = json_decode($this->toJson($data, true), true);
|
||||
}
|
||||
|
||||
|
@@ -74,8 +74,6 @@ class FirePHPHandler extends AbstractProcessingHandler
|
||||
{
|
||||
$header = sprintf('%s-%s', static::HEADER_PREFIX, join('-', $meta));
|
||||
|
||||
// See https://github.com/phpstan/phpstan/issues/5219
|
||||
// @phpstan-ignore-next-line
|
||||
return [$header => $message];
|
||||
}
|
||||
|
||||
|
@@ -436,7 +436,6 @@ class Logger implements LoggerInterface, ResettableInterface
|
||||
throw new InvalidArgumentException('Level "'.var_export($level, true).'" is not defined, use one of: '.implode(', ', array_keys(static::$levels) + static::$levels));
|
||||
}
|
||||
|
||||
/** @phpstan-ignore-next-line */
|
||||
return $level;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user