mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 09:06:10 +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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user