Skip to content

[ErrorHandler] Add return type hints #17096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions controller/error_pages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand All @@ -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;
}
Expand Down