Skip to content

Commit 1163903

Browse files
committed
SCA: simplify some ifs in favour of null coalescing operator
1 parent 04ba588 commit 1163903

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

DependencyInjection/SecurityExtension.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,7 @@ private function createFirewall(ContainerBuilder $container, $id, $firewall, &$a
283283
$contextKey = null;
284284
// Context serializer listener
285285
if (false === $firewall['stateless']) {
286-
$contextKey = $id;
287-
if (isset($firewall['context'])) {
288-
$contextKey = $firewall['context'];
289-
}
290-
286+
$contextKey = $firewall['context'] ?? $id;
291287
$listeners[] = new Reference($this->createContextListener($container, $contextKey));
292288
$sessionStrategyId = 'security.authentication.session_strategy';
293289
} else {

0 commit comments

Comments
 (0)