Skip to content

Commit 05480c5

Browse files
committed
Update coding standards
1 parent f6298a1 commit 05480c5

13 files changed

+15
-15
lines changed

Controller/SecurityController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class SecurityController extends AbstractController
2929
private $authenticationUtils;
3030
private $tokenManager;
3131

32-
public function __construct(AuthenticationUtils $authenticationUtils, CsrfTokenManagerInterface $tokenManager = null)
32+
public function __construct(AuthenticationUtils $authenticationUtils, ?CsrfTokenManagerInterface $tokenManager = null)
3333
{
3434
$this->authenticationUtils = $authenticationUtils;
3535
$this->tokenManager = $tokenManager;

Event/UserEvent.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class UserEvent extends Event
2727
*/
2828
protected $user;
2929

30-
public function __construct(UserInterface $user, Request $request = null)
30+
public function __construct(UserInterface $user, ?Request $request = null)
3131
{
3232
$this->user = $user;
3333
$this->request = $request;

Form/Factory/FormFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class FormFactory implements FactoryInterface
4343
* @param string $type
4444
* @param string[]|null $validationGroups
4545
*/
46-
public function __construct(FormFactoryInterface $formFactory, $name, $type, array $validationGroups = null)
46+
public function __construct(FormFactoryInterface $formFactory, $name, $type, ?array $validationGroups = null)
4747
{
4848
$this->formFactory = $formFactory;
4949
$this->name = $name;

Model/User.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ public function setPlainPassword($password)
353353
return $this;
354354
}
355355

356-
public function setLastLogin(\DateTime $time = null)
356+
public function setLastLogin(?\DateTime $time = null)
357357
{
358358
$this->lastLogin = $time;
359359

@@ -367,7 +367,7 @@ public function setConfirmationToken($confirmationToken)
367367
return $this;
368368
}
369369

370-
public function setPasswordRequestedAt(\DateTime $date = null)
370+
public function setPasswordRequestedAt(?\DateTime $date = null)
371371
{
372372
$this->passwordRequestedAt = $date;
373373

Model/UserInterface.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public function setConfirmationToken($confirmationToken);
191191
*
192192
* @return static
193193
*/
194-
public function setPasswordRequestedAt(\DateTime $date = null);
194+
public function setPasswordRequestedAt(?\DateTime $date = null);
195195

196196
/**
197197
* Checks whether the password reset request has expired.
@@ -207,7 +207,7 @@ public function isPasswordRequestNonExpired($ttl);
207207
*
208208
* @return static
209209
*/
210-
public function setLastLogin(\DateTime $time = null);
210+
public function setLastLogin(?\DateTime $time = null);
211211

212212
/**
213213
* Never use this to check if this user has access to anything!

Security/LoginManager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function __construct(TokenStorageInterface $tokenStorage, UserCheckerInte
7373
$this->rememberMeHandler = $rememberMeHandler;
7474
}
7575

76-
final public function logInUser($firewallName, UserInterface $user, Response $response = null): void
76+
final public function logInUser($firewallName, UserInterface $user, ?Response $response = null): void
7777
{
7878
$this->userChecker->checkPreAuth($user);
7979

Security/LoginManagerInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ interface LoginManagerInterface
2121
*
2222
* @return void
2323
*/
24-
public function logInUser($firewallName, UserInterface $user, Response $response = null);
24+
public function logInUser($firewallName, UserInterface $user, ?Response $response = null);
2525
}

Tests/Command/ActivateUserCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function testExecuteInteractiveWithQuestionHelper()
6060
/**
6161
* @return CommandTester
6262
*/
63-
private function createCommandTester(UserManipulator $manipulator, Application $application = null)
63+
private function createCommandTester(UserManipulator $manipulator, ?Application $application = null)
6464
{
6565
if (null === $application) {
6666
$application = new Application();

Tests/Command/ChangePasswordCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function testExecuteInteractiveWithQuestionHelper()
6161
/**
6262
* @return CommandTester
6363
*/
64-
private function createCommandTester(UserManipulator $userManipulator, Application $application = null)
64+
private function createCommandTester(UserManipulator $userManipulator, ?Application $application = null)
6565
{
6666
if (null === $application) {
6767
$application = new Application();

Tests/Command/CreateUserCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function testExecuteInteractiveWithQuestionHelper()
6464
/**
6565
* @return CommandTester
6666
*/
67-
private function createCommandTester(UserManipulator $manipulator, Application $application = null)
67+
private function createCommandTester(UserManipulator $manipulator, ?Application $application = null)
6868
{
6969
if (null === $application) {
7070
$application = new Application();

Tests/Command/DeactivateUserCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function testExecuteInteractiveWithQuestionHelper()
6060
/**
6161
* @return CommandTester
6262
*/
63-
private function createCommandTester(UserManipulator $manipulator, Application $application = null)
63+
private function createCommandTester(UserManipulator $manipulator, ?Application $application = null)
6464
{
6565
if (null === $application) {
6666
$application = new Application();

Tests/Command/DemoteUserCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function testExecuteInteractiveWithQuestionHelper()
6161
/**
6262
* @return CommandTester
6363
*/
64-
private function createCommandTester(UserManipulator $manipulator, Application $application = null)
64+
private function createCommandTester(UserManipulator $manipulator, ?Application $application = null)
6565
{
6666
if (null === $application) {
6767
$application = new Application();

Tests/Command/PromoteUserCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function testExecuteInteractiveWithQuestionHelper()
6161
/**
6262
* @return CommandTester
6363
*/
64-
private function createCommandTester(UserManipulator $manipulator, Application $application = null)
64+
private function createCommandTester(UserManipulator $manipulator, ?Application $application = null)
6565
{
6666
if (null === $application) {
6767
$application = new Application();

0 commit comments

Comments
 (0)