Skip to content

Commit a407cf8

Browse files
[ErrorHandler] Add return type hints
Added return type hints for normalize & supportsNormalization (v6.0)
1 parent 1a2f391 commit a407cf8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

controller/error_pages.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ contents, create a new Normalizer that supports the ``FlattenException`` input::
220220

221221
class MyCustomProblemNormalizer implements NormalizerInterface
222222
{
223-
public function normalize($exception, string $format = null, array $context = [])
223+
public function normalize($exception, string $format = null, array $context = []): array
224224
{
225225
return [
226226
'content' => 'This is my custom problem normalizer.',
@@ -231,7 +231,7 @@ contents, create a new Normalizer that supports the ``FlattenException`` input::
231231
];
232232
}
233233

234-
public function supportsNormalization($data, string $format = null)
234+
public function supportsNormalization($data, string $format = null): bool
235235
{
236236
return $data instanceof FlattenException;
237237
}

0 commit comments

Comments
 (0)