diff --git a/templates/authenticator/EmptyAuthenticator.tpl.php b/templates/authenticator/EmptyAuthenticator.tpl.php index bfa1e7fc1..66c124490 100644 --- a/templates/authenticator/EmptyAuthenticator.tpl.php +++ b/templates/authenticator/EmptyAuthenticator.tpl.php @@ -26,7 +26,7 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio // TODO: Implement onAuthenticationFailure() method. } -// public function start(Request $request, AuthenticationException $authException = null): Response +// public function start(Request $request, ?AuthenticationException $authException = null): Response // { // /* // * If you would like this class to control what happens when an anonymous user accesses a diff --git a/templates/security/custom/Authenticator.tpl.php b/templates/security/custom/Authenticator.tpl.php index dacec9b52..9aaa46235 100644 --- a/templates/security/custom/Authenticator.tpl.php +++ b/templates/security/custom/Authenticator.tpl.php @@ -54,7 +54,7 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio return new JsonResponse($data, Response::HTTP_UNAUTHORIZED); } - // public function start(Request $request, AuthenticationException $authException = null): Response + // public function start(Request $request, ?AuthenticationException $authException = null): Response // { // /* // * If you would like this class to control what happens when an anonymous user accesses a diff --git a/templates/serializer/Normalizer.tpl.php b/templates/serializer/Normalizer.tpl.php index 8fdeee82b..504d7efb6 100644 --- a/templates/serializer/Normalizer.tpl.php +++ b/templates/serializer/Normalizer.tpl.php @@ -12,7 +12,7 @@ public function __construct( ) { } - public function normalize($object, string $format = null, array $context = []): array + public function normalize($object, ?string $format = null, array $context = []): array { $data = $this->normalizer->normalize($object, $format, $context); @@ -21,7 +21,7 @@ public function normalize($object, string $format = null, array $context = []): return $data; } - public function supportsNormalization($data, string $format = null, array $context = []): bool + public function supportsNormalization($data, ?string $format = null, array $context = []): bool { return $data instanceof ; diff --git a/tests/fixtures/make-entity/regenerate-embedded/attributes/src/Entity/Money.php b/tests/fixtures/make-entity/regenerate-embedded/attributes/src/Entity/Money.php index f5e46a29a..87f226377 100644 --- a/tests/fixtures/make-entity/regenerate-embedded/attributes/src/Entity/Money.php +++ b/tests/fixtures/make-entity/regenerate-embedded/attributes/src/Entity/Money.php @@ -16,7 +16,7 @@ class Money #[ORM\Column(name: 'amount')] private ?int $amount; - public function __construct($amount = null, Currency $currency = null) + public function __construct($amount = null, ?Currency $currency = null) { $this->amount = $amount; $this->currency = $currency ?? new Currency(); diff --git a/tests/fixtures/security/make-custom-authenticator/expected/FixtureAuthenticator.php b/tests/fixtures/security/make-custom-authenticator/expected/FixtureAuthenticator.php index c9edf8402..b6126fdff 100644 --- a/tests/fixtures/security/make-custom-authenticator/expected/FixtureAuthenticator.php +++ b/tests/fixtures/security/make-custom-authenticator/expected/FixtureAuthenticator.php @@ -63,7 +63,7 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio return new JsonResponse($data, Response::HTTP_UNAUTHORIZED); } - // public function start(Request $request, AuthenticationException $authException = null): Response + // public function start(Request $request, ?AuthenticationException $authException = null): Response // { // /* // * If you would like this class to control what happens when an anonymous user accesses a