Skip to content

Commit 5f86277

Browse files
Merge branch '4.4'
* 4.4: some backports from master Add return types to internal|final|private methods [HttpFoundation] Precalculate session expiry timestamp
2 parents 6b8960c + 6e66de8 commit 5f86277

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Authorization/TraceableAccessDecisionManager.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function __construct(AccessDecisionManagerInterface $manager)
4848
/**
4949
* {@inheritdoc}
5050
*/
51-
public function decide(TokenInterface $token, array $attributes, $object = null)
51+
public function decide(TokenInterface $token, array $attributes, $object = null): bool
5252
{
5353
$currentDecisionLog = [
5454
'attributes' => $attributes,
@@ -86,7 +86,7 @@ public function addVoterVote(VoterInterface $voter, array $attributes, int $vote
8686
/**
8787
* @return string
8888
*/
89-
public function getStrategy()
89+
public function getStrategy(): string
9090
{
9191
// The $strategy property is misleading because it stores the name of its
9292
// method (e.g. 'decideAffirmative') instead of the original strategy name
@@ -97,15 +97,15 @@ public function getStrategy()
9797
/**
9898
* @return iterable|VoterInterface[]
9999
*/
100-
public function getVoters()
100+
public function getVoters(): iterable
101101
{
102102
return $this->voters;
103103
}
104104

105105
/**
106106
* @return array
107107
*/
108-
public function getDecisionLog()
108+
public function getDecisionLog(): array
109109
{
110110
return $this->decisionLog;
111111
}

User/MissingUserProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,23 @@ public function __construct(string $firewall)
3232
/**
3333
* {@inheritdoc}
3434
*/
35-
public function loadUserByUsername(string $username)
35+
public function loadUserByUsername(string $username): UserInterface
3636
{
3737
throw new \BadMethodCallException();
3838
}
3939

4040
/**
4141
* {@inheritdoc}
4242
*/
43-
public function refreshUser(UserInterface $user)
43+
public function refreshUser(UserInterface $user): UserInterface
4444
{
4545
throw new \BadMethodCallException();
4646
}
4747

4848
/**
4949
* {@inheritdoc}
5050
*/
51-
public function supportsClass(string $class)
51+
public function supportsClass(string $class): bool
5252
{
5353
throw new \BadMethodCallException();
5454
}

0 commit comments

Comments
 (0)