Skip to content

Commit cdf9dc4

Browse files
mbuliardnicolas-grekas
authored andcommitted
[Security] Add missing void PHPdoc return types
1 parent c0d04e6 commit cdf9dc4

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

Firewall/AccessListener.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ public function supports(Request $request): ?bool
6060
/**
6161
* Handles access authorization.
6262
*
63+
* @void
64+
*
6365
* @throws AccessDeniedException
6466
*/
6567
public function authenticate(RequestEvent $event)

Firewall/FirewallListenerInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ public function supports(Request $request): ?bool;
3232

3333
/**
3434
* Does whatever is required to authenticate the request, typically calling $event->setResponse() internally.
35+
*
36+
* @return void
3537
*/
3638
public function authenticate(RequestEvent $event);
3739

Session/SessionAuthenticationStrategyInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ interface SessionAuthenticationStrategyInterface
2929
*
3030
* This method should be called before the TokenStorage is populated with a
3131
* Token. It should be used by authentication listeners when a session is used.
32+
*
33+
* @return void
3234
*/
3335
public function onAuthentication(Request $request, TokenInterface $token);
3436
}

Tests/EventListener/PasswordMigratingListenerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public function getRoles(): array
170170
return [];
171171
}
172172

173-
public function eraseCredentials()
173+
public function eraseCredentials(): void
174174
{
175175
}
176176

Tests/Firewall/ContextListenerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ public function getUser(): UserInterface
548548
return $this->user;
549549
}
550550

551-
public function setUser($user)
551+
public function setUser($user): void
552552
{
553553
$this->user = $user;
554554
}
@@ -572,7 +572,7 @@ public function setAuthenticated(bool $isAuthenticated)
572572
{
573573
}
574574

575-
public function eraseCredentials()
575+
public function eraseCredentials(): void
576576
{
577577
}
578578

@@ -581,7 +581,7 @@ public function getAttributes(): array
581581
return [];
582582
}
583583

584-
public function setAttributes(array $attributes)
584+
public function setAttributes(array $attributes): void
585585
{
586586
}
587587

@@ -595,7 +595,7 @@ public function getAttribute(string $name): mixed
595595
return null;
596596
}
597597

598-
public function setAttribute(string $name, $value)
598+
public function setAttribute(string $name, $value): void
599599
{
600600
}
601601
}

0 commit comments

Comments
 (0)