Skip to content

Commit d0bbaa0

Browse files
wouterjnicolas-grekas
authored andcommitted
Add void return types
1 parent 4ba265f commit d0bbaa0

14 files changed

+60
-2
lines changed

Authentication/RememberMe/InMemoryTokenProvider.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ public function loadTokenBySeries(string $series): PersistentTokenInterface
3131
return $this->tokens[$series];
3232
}
3333

34+
/**
35+
* @return void
36+
*/
3437
public function updateToken(string $series, #[\SensitiveParameter] string $tokenValue, \DateTime $lastUsed)
3538
{
3639
if (!isset($this->tokens[$series])) {
@@ -47,11 +50,17 @@ public function updateToken(string $series, #[\SensitiveParameter] string $token
4750
$this->tokens[$series] = $token;
4851
}
4952

53+
/**
54+
* @return void
55+
*/
5056
public function deleteTokenBySeries(string $series)
5157
{
5258
unset($this->tokens[$series]);
5359
}
5460

61+
/**
62+
* @return void
63+
*/
5564
public function createNewToken(PersistentTokenInterface $token)
5665
{
5766
$this->tokens[$token->getSeries()] = $token;

Authentication/Token/AbstractToken.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,17 @@ public function getUser(): ?UserInterface
5353
return $this->user;
5454
}
5555

56+
/**
57+
* @return void
58+
*/
5659
public function setUser(UserInterface $user)
5760
{
5861
$this->user = $user;
5962
}
6063

64+
/**
65+
* @return void
66+
*/
6167
public function eraseCredentials()
6268
{
6369
if ($this->getUser() instanceof UserInterface) {
@@ -112,6 +118,9 @@ public function getAttributes(): array
112118
return $this->attributes;
113119
}
114120

121+
/**
122+
* @return void
123+
*/
115124
public function setAttributes(array $attributes)
116125
{
117126
$this->attributes = $attributes;
@@ -131,6 +140,9 @@ public function getAttribute(string $name): mixed
131140
return $this->attributes[$name];
132141
}
133142

143+
/**
144+
* @return void
145+
*/
134146
public function setAttribute(string $name, mixed $value)
135147
{
136148
$this->attributes[$name] = $value;

Authentication/Token/NullToken.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public function getUserIdentifier(): string
4343
return '';
4444
}
4545

46+
/**
47+
* @return void
48+
*/
4649
public function eraseCredentials()
4750
{
4851
}

Authentication/Token/Storage/TokenStorage.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public function getToken(): ?TokenInterface
3737
return $this->token;
3838
}
3939

40+
/**
41+
* @return void
42+
*/
4043
public function setToken(TokenInterface $token = null)
4144
{
4245
if (1 > \func_num_args()) {
@@ -57,6 +60,9 @@ public function setInitializer(?callable $initializer): void
5760
$this->initializer = null === $initializer ? null : $initializer(...);
5861
}
5962

63+
/**
64+
* @return void
65+
*/
6066
public function reset()
6167
{
6268
$this->setToken(null);

Authorization/TraceableAccessDecisionManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function decide(TokenInterface $token, array $attributes, mixed $object =
7272
* @param array $attributes attributes used for the vote
7373
* @param int $vote vote of the voter
7474
*/
75-
public function addVoterVote(VoterInterface $voter, array $attributes, int $vote)
75+
public function addVoterVote(VoterInterface $voter, array $attributes, int $vote): void
7676
{
7777
$currentLogIndex = \count($this->currentLog) - 1;
7878
$this->currentLog[$currentLogIndex]['voterDetails'][] = [

Exception/AccessDeniedException.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ public function getAttributes(): array
3434
return $this->attributes;
3535
}
3636

37+
/**
38+
* @return void
39+
*/
3740
public function setAttributes(array|string $attributes)
3841
{
3942
$this->attributes = (array) $attributes;
@@ -44,6 +47,9 @@ public function getSubject(): mixed
4447
return $this->subject;
4548
}
4649

50+
/**
51+
* @return void
52+
*/
4753
public function setSubject(mixed $subject)
4854
{
4955
$this->subject = $subject;

Exception/AccountStatusException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ public function getUser(): ?UserInterface
3232
return $this->user;
3333
}
3434

35+
/**
36+
* @return void
37+
*/
3538
public function setUser(UserInterface $user)
3639
{
3740
$this->user = $user;

Exception/AuthenticationException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public function getToken(): ?TokenInterface
3939
return $this->token;
4040
}
4141

42+
/**
43+
* @return void
44+
*/
4245
public function setToken(TokenInterface $token)
4346
{
4447
$this->token = $token;

Exception/CustomUserMessageAccountStatusException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public function __construct(string $message = '', array $messageData = [], int $
3838
*
3939
* @param string $messageKey The message or message key
4040
* @param array $messageData Data to be passed into the translator
41+
*
42+
* @return void
4143
*/
4244
public function setSafeMessage(string $messageKey, array $messageData = [])
4345
{

Exception/CustomUserMessageAuthenticationException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public function __construct(string $message = '', array $messageData = [], int $
3737
*
3838
* @param string $messageKey The message or message key
3939
* @param array $messageData Data to be passed into the translator
40+
*
41+
* @return void
4042
*/
4143
public function setSafeMessage(string $messageKey, array $messageData = [])
4244
{

0 commit comments

Comments
 (0)