mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 09:06:10 +02:00
Add Record/Level/LevelName type aliases and improve phpstan type coverage to level 6
This commit is contained in:
@@ -123,7 +123,7 @@ class NormalizerFormatter implements FormatterInterface
|
||||
|
||||
/**
|
||||
* @param mixed $data
|
||||
* @return int|bool|string|null|array
|
||||
* @return scalar|array<scalar>
|
||||
*/
|
||||
protected function normalize($data, int $depth = 0)
|
||||
{
|
||||
@@ -189,7 +189,7 @@ class NormalizerFormatter implements FormatterInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return mixed[]
|
||||
*/
|
||||
protected function normalizeException(Throwable $e, int $depth = 0)
|
||||
{
|
||||
@@ -248,6 +248,9 @@ class NormalizerFormatter implements FormatterInterface
|
||||
return Utils::jsonEncode($data, $this->jsonEncodeOptions, $ignoreErrors);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
protected function formatDate(\DateTimeInterface $date)
|
||||
{
|
||||
// in case the date format isn't custom then we defer to the custom DateTimeImmutable
|
||||
@@ -259,12 +262,12 @@ class NormalizerFormatter implements FormatterInterface
|
||||
return $date->format($this->dateFormat);
|
||||
}
|
||||
|
||||
public function addJsonEncodeOption(int $option)
|
||||
public function addJsonEncodeOption(int $option): void
|
||||
{
|
||||
$this->jsonEncodeOptions |= $option;
|
||||
}
|
||||
|
||||
public function removeJsonEncodeOption(int $option)
|
||||
public function removeJsonEncodeOption(int $option): void
|
||||
{
|
||||
$this->jsonEncodeOptions &= ~$option;
|
||||
}
|
||||
|
Reference in New Issue
Block a user