Skip to content

Commit 6f8949a

Browse files
wouterjnicolas-grekas
authored andcommitted
Add void return types
1 parent 8a60014 commit 6f8949a

19 files changed

+52
-14
lines changed

AccessMap.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ class AccessMap implements AccessMapInterface
2727
/**
2828
* @param array $attributes An array of attributes to pass to the access decision manager (like roles)
2929
* @param string|null $channel The channel to enforce (http, https, or null)
30+
*
31+
* @return void
3032
*/
3133
public function add(RequestMatcherInterface $requestMatcher, array $attributes = [], string $channel = null)
3234
{

Authentication/DefaultAuthenticationFailureHandler.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ public function getOptions(): array
5959
return $this->options;
6060
}
6161

62+
/**
63+
* @return void
64+
*/
6265
public function setOptions(array $options)
6366
{
6467
$this->options = array_merge($this->defaultOptions, $options);

Authentication/DefaultAuthenticationSuccessHandler.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ public function getOptions(): array
6565
return $this->options;
6666
}
6767

68+
/**
69+
* @return void
70+
*/
6871
public function setOptions(array $options)
6972
{
7073
$this->options = array_merge($this->defaultOptions, $options);

Authenticator/AccessTokenAuthenticator.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio
9595
);
9696
}
9797

98+
/**
99+
* @return void
100+
*/
98101
public function setTranslator(?TranslatorInterface $translator)
99102
{
100103
$this->translator = $translator;

Event/LoginFailureEvent.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ public function getRequest(): Request
6565
return $this->request;
6666
}
6767

68+
/**
69+
* @return void
70+
*/
6871
public function setResponse(?Response $response)
6972
{
7073
$this->response = $response;

Event/SwitchUserEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function getToken(): ?TokenInterface
4949
return $this->token;
5050
}
5151

52-
public function setToken(TokenInterface $token)
52+
public function setToken(TokenInterface $token): void
5353
{
5454
$this->token = $token;
5555
}

EventListener/IsGrantedAttributeListener.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ public function __construct(
3636
) {
3737
}
3838

39+
/**
40+
* @return void
41+
*/
3942
public function onKernelControllerArguments(ControllerArgumentsEvent $event)
4043
{
4144
/** @var IsGranted[] $attributes */

Firewall.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ public function __construct(FirewallMapInterface $map, EventDispatcherInterface
4747
$this->exceptionListeners = new \SplObjectStorage();
4848
}
4949

50+
/**
51+
* @return void
52+
*/
5053
public function onKernelRequest(RequestEvent $event)
5154
{
5255
if (!$event->isMainRequest()) {
@@ -92,6 +95,9 @@ public function onKernelRequest(RequestEvent $event)
9295
$this->callListeners($event, $authenticationListeners());
9396
}
9497

98+
/**
99+
* @return void
100+
*/
95101
public function onKernelFinishRequest(FinishRequestEvent $event)
96102
{
97103
$request = $event->getRequest();
@@ -110,6 +116,9 @@ public static function getSubscribedEvents()
110116
];
111117
}
112118

119+
/**
120+
* @return void
121+
*/
113122
protected function callListeners(RequestEvent $event, iterable $listeners)
114123
{
115124
foreach ($listeners as $listener) {

Firewall/ChannelListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function supports(Request $request): ?bool
7070
return false;
7171
}
7272

73-
public function authenticate(RequestEvent $event)
73+
public function authenticate(RequestEvent $event): void
7474
{
7575
$request = $event->getRequest();
7676

Firewall/ContextListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function supports(Request $request): ?bool
7979
/**
8080
* Reads the Security Token from the session.
8181
*/
82-
public function authenticate(RequestEvent $event)
82+
public function authenticate(RequestEvent $event): void
8383
{
8484
if (!$this->registered && null !== $this->dispatcher && $event->isMainRequest()) {
8585
$this->dispatcher->addListener(KernelEvents::RESPONSE, $this->onKernelResponse(...));
@@ -147,7 +147,7 @@ public function authenticate(RequestEvent $event)
147147
/**
148148
* Writes the security token into the session.
149149
*/
150-
public function onKernelResponse(ResponseEvent $event)
150+
public function onKernelResponse(ResponseEvent $event): void
151151
{
152152
if (!$event->isMainRequest()) {
153153
return;

0 commit comments

Comments
 (0)