From a407cf83a8ea4081a68033c036789f23813a0d4c Mon Sep 17 00:00:00 2001 From: mohamed gasmi Date: Tue, 2 Aug 2022 20:03:08 +0200 Subject: [PATCH] [ErrorHandler] Add return type hints Added return type hints for normalize & supportsNormalization (v6.0) --- controller/error_pages.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controller/error_pages.rst b/controller/error_pages.rst index 320c1aaae62..0862c506d74 100644 --- a/controller/error_pages.rst +++ b/controller/error_pages.rst @@ -220,7 +220,7 @@ contents, create a new Normalizer that supports the ``FlattenException`` input:: class MyCustomProblemNormalizer implements NormalizerInterface { - public function normalize($exception, string $format = null, array $context = []) + public function normalize($exception, string $format = null, array $context = []): array { return [ 'content' => 'This is my custom problem normalizer.', @@ -231,7 +231,7 @@ contents, create a new Normalizer that supports the ``FlattenException`` input:: ]; } - public function supportsNormalization($data, string $format = null) + public function supportsNormalization($data, string $format = null): bool { return $data instanceof FlattenException; }