Skip to content

Commit

Permalink
Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_…
Browse files Browse the repository at this point in the history
…null_value
  • Loading branch information
nicolas-grekas committed Jan 23, 2024
1 parent 72c5314 commit b6fb8c8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Authenticator/AbstractFormLoginAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function supportsRememberMe()
*
* @return Response
*/
public function start(Request $request, AuthenticationException $authException = null)
public function start(Request $request, ?AuthenticationException $authException = null)
{
$url = $this->getLoginUrl();

Expand Down
2 changes: 1 addition & 1 deletion Authenticator/GuardBridgeAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct(GuardAuthenticatorInterface $guard, UserProviderInte
$this->userProvider = $userProvider;
}

public function start(Request $request, AuthenticationException $authException = null)
public function start(Request $request, ?AuthenticationException $authException = null)
{
return $this->guard->start($request, $authException);
}
Expand Down
4 changes: 2 additions & 2 deletions Firewall/GuardAuthenticationListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class GuardAuthenticationListener extends AbstractListener
* @param string $providerKey The provider (i.e. firewall) key
* @param iterable<array-key, AuthenticatorInterface> $guardAuthenticators The authenticators, with keys that match what's passed to GuardAuthenticationProvider
*/
public function __construct(GuardAuthenticatorHandler $guardHandler, AuthenticationManagerInterface $authenticationManager, string $providerKey, iterable $guardAuthenticators, LoggerInterface $logger = null, bool $hideUserNotFoundExceptions = true, TokenStorageInterface $tokenStorage = null)
public function __construct(GuardAuthenticatorHandler $guardHandler, AuthenticationManagerInterface $authenticationManager, string $providerKey, iterable $guardAuthenticators, ?LoggerInterface $logger = null, bool $hideUserNotFoundExceptions = true, ?TokenStorageInterface $tokenStorage = null)
{
if (empty($providerKey)) {
throw new \InvalidArgumentException('$providerKey must not be empty.');
Expand Down Expand Up @@ -223,7 +223,7 @@ public function setRememberMeServices(RememberMeServicesInterface $rememberMeSer
* Checks to see if remember me is supported in the authenticator and
* on the firewall. If it is, the RememberMeServicesInterface is notified.
*/
private function triggerRememberMe(AuthenticatorInterface $guardAuthenticator, Request $request, TokenInterface $token, Response $response = null)
private function triggerRememberMe(AuthenticatorInterface $guardAuthenticator, Request $request, TokenInterface $token, ?Response $response = null)
{
if (null === $this->rememberMeServices) {
if (null !== $this->logger) {
Expand Down
4 changes: 2 additions & 2 deletions GuardAuthenticatorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class GuardAuthenticatorHandler
/**
* @param array $statelessProviderKeys An array of provider/firewall keys that are "stateless" and so do not need the session migrated on success
*/
public function __construct(TokenStorageInterface $tokenStorage, EventDispatcherInterface $eventDispatcher = null, array $statelessProviderKeys = [])
public function __construct(TokenStorageInterface $tokenStorage, ?EventDispatcherInterface $eventDispatcher = null, array $statelessProviderKeys = [])
{
$this->tokenStorage = $tokenStorage;
$this->dispatcher = $eventDispatcher;
Expand All @@ -56,7 +56,7 @@ public function __construct(TokenStorageInterface $tokenStorage, EventDispatcher
/**
* Authenticates the given token in the system.
*/
public function authenticateWithToken(TokenInterface $token, Request $request, string $providerKey = null, TokenInterface $previousToken = null)
public function authenticateWithToken(TokenInterface $token, Request $request, ?string $providerKey = null, ?TokenInterface $previousToken = null)
{
$this->migrateSession($request, $token, $providerKey, 3 < \func_num_args() ? $previousToken : $this->tokenStorage->getToken());
$this->tokenStorage->setToken($token);
Expand Down

0 comments on commit b6fb8c8

Please sign in to comment.