1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 17:16:18 +02:00

More type hints

This commit is contained in:
Jordi Boggiano
2016-05-26 17:40:25 +01:00
parent 76a91c6722
commit 6f26801be6
3 changed files with 9 additions and 23 deletions

View File

@@ -163,17 +163,12 @@ class JsonFormatter extends NormalizerFormatter
* Normalizes given exception with or without its own stack trace based on
* `includeStacktraces` property.
*
* @param Exception|Throwable $e
* @param Throwable $e
*
* @return array
*/
protected function normalizeException($e)
protected function normalizeException(\Throwable $e)
{
// TODO 2.0 only check for Throwable
if (!$e instanceof Exception && !$e instanceof \Throwable) {
throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.get_class($e));
}
$data = array(
'class' => get_class($e),
'message' => $e->getMessage(),