Skip to content

Commit 0be0b2e

Browse files
committed
minor #10717 unified return null usages (fabpot)
This PR was merged into the 2.3 branch. Discussion ---------- unified return null usages | Q | A | ------------- | --- | License | MIT This PR unifies the way we return `null` from a function or method: * always use `return;` instead of `return null;` (the current code base uses both); * never use `return;` at the end of a function/method. Commits ------- d1d569b unified return null usages
2 parents e76be03 + 9fa065f commit 0be0b2e

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

Authentication/Provider/AnonymousAuthenticationProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct($key)
4040
public function authenticate(TokenInterface $token)
4141
{
4242
if (!$this->supports($token)) {
43-
return null;
43+
return;
4444
}
4545

4646
if ($this->key !== $token->getKey()) {

Authentication/Provider/PreAuthenticatedAuthenticationProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function __construct(UserProviderInterface $userProvider, UserCheckerInte
5353
public function authenticate(TokenInterface $token)
5454
{
5555
if (!$this->supports($token)) {
56-
return null;
56+
return;
5757
}
5858

5959
if (!$user = $token->getUser()) {

Authentication/Provider/UserAuthenticationProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function __construct(UserCheckerInterface $userChecker, $providerKey, $hi
5858
public function authenticate(TokenInterface $token)
5959
{
6060
if (!$this->supports($token)) {
61-
return null;
61+
return;
6262
}
6363

6464
$username = $token->getUsername();

User/User.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ public function getPassword()
6464
*/
6565
public function getSalt()
6666
{
67-
return null;
6867
}
6968

7069
/**

0 commit comments

Comments
 (0)