Skip to content

Commit 4875963

Browse files
committed
minor #17096 [ErrorHandler] Add return type hints (mohamedGasmii)
This PR was merged into the 6.0 branch. Discussion ---------- [ErrorHandler] Add return type hints Added return type hints for normalize & supportsNormalization <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> Commits ------- a407cf8 [ErrorHandler] Add return type hints
2 parents 5b56c19 + a407cf8 commit 4875963

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)