Skip to content

Commit 86d3616

Browse files
Use ??= more
1 parent 5be87f6 commit 86d3616

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Authorization/Voter/ExpressionVoter.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ public function vote(TokenInterface $token, mixed $subject, array $attributes):
5858
continue;
5959
}
6060

61-
if (null === $variables) {
62-
$variables = $this->getVariables($token, $subject);
63-
}
61+
$variables ??= $this->getVariables($token, $subject);
6462

6563
$result = VoterInterface::ACCESS_DENIED;
6664
if ($this->expressionLanguage->evaluate($attribute, $variables)) {

0 commit comments

Comments
 (0)