Skip to content

Commit f5538ac

Browse files
mbuliardnicolas-grekas
authored andcommitted
[Security] Add missing void PHPdoc return types
1 parent 7aa6944 commit f5538ac

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

Debug/WrappedLazyListener.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ public function supports(Request $request): ?bool
3838
return $this->listener->supports($request);
3939
}
4040

41-
public function authenticate(RequestEvent $event)
41+
public function authenticate(RequestEvent $event): void
4242
{
4343
$startTime = microtime(true);
4444

4545
try {
46-
$ret = $this->listener->authenticate($event);
46+
$this->listener->authenticate($event);
4747
} catch (LazyResponseException $e) {
4848
$this->response = $e->getResponse();
4949

@@ -53,7 +53,5 @@ public function authenticate(RequestEvent $event)
5353
}
5454

5555
$this->response = $event->getResponse();
56-
57-
return $ret;
5856
}
5957
}

Tests/DependencyInjection/Compiler/SortFirewallListenersPassTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function supports(Request $request): ?bool
6565
{
6666
}
6767

68-
public function authenticate(RequestEvent $event)
68+
public function authenticate(RequestEvent $event): void
6969
{
7070
}
7171

@@ -81,7 +81,7 @@ public function supports(Request $request): ?bool
8181
{
8282
}
8383

84-
public function authenticate(RequestEvent $event)
84+
public function authenticate(RequestEvent $event): void
8585
{
8686
}
8787

@@ -97,7 +97,7 @@ public function supports(Request $request): ?bool
9797
{
9898
}
9999

100-
public function authenticate(RequestEvent $event)
100+
public function authenticate(RequestEvent $event): void
101101
{
102102
}
103103

Tests/DependencyInjection/SecurityExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,11 +923,11 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio
923923

924924
class TestUserChecker implements UserCheckerInterface
925925
{
926-
public function checkPreAuth(UserInterface $user)
926+
public function checkPreAuth(UserInterface $user): void
927927
{
928928
}
929929

930-
public function checkPostAuth(UserInterface $user)
930+
public function checkPostAuth(UserInterface $user): void
931931
{
932932
}
933933
}

Tests/Functional/Bundle/RememberMeBundle/Security/StaticTokenProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ public function loadTokenBySeries(string $series): PersistentTokenInterface
3939
return $token;
4040
}
4141

42-
public function deleteTokenBySeries(string $series)
42+
public function deleteTokenBySeries(string $series): void
4343
{
4444
unset(self::$db[$series]);
4545
}
4646

47-
public function updateToken(string $series, string $tokenValue, \DateTime $lastUsed)
47+
public function updateToken(string $series, string $tokenValue, \DateTime $lastUsed): void
4848
{
4949
$token = $this->loadTokenBySeries($series);
5050
$refl = new \ReflectionClass($token);
@@ -57,7 +57,7 @@ public function updateToken(string $series, string $tokenValue, \DateTime $lastU
5757
self::$db[$series] = $token;
5858
}
5959

60-
public function createNewToken(PersistentTokenInterface $token)
60+
public function createNewToken(PersistentTokenInterface $token): void
6161
{
6262
self::$db[$token->getSeries()] = $token;
6363
}

0 commit comments

Comments
 (0)