Skip to content
This repository was archived by the owner on Dec 2, 2021. It is now read-only.

Commit 1494d0d

Browse files
jdreesenscheb
authored andcommitted
Use null coalescing operator instead of ternary if
1 parent bc17ad6 commit 1494d0d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Security/Http/Firewall/TwoFactorListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function __construct(
141141
$this->twoFactorAccessDecider = $twoFactorAccessDecider;
142142
$this->eventDispatcher = $eventDispatcher;
143143
$this->twoFactorTokenFactory = $twoFactorTokenFactory;
144-
$this->logger = $logger === null ? new NullLogger() : $logger;
144+
$this->logger = $logger ?? new NullLogger();
145145
$this->trustedDeviceManager = $trustedDeviceManager;
146146
}
147147

Security/TwoFactor/Provider/TwoFactorProviderPreparationListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function __construct(
5959
) {
6060
$this->providerRegistry = $providerRegistry;
6161
$this->preparationRecorder = $preparationRecorder;
62-
$this->logger = $logger === null ? new NullLogger() : $logger;
62+
$this->logger = $logger ?? new NullLogger();
6363
$this->firewallName = $firewallName;
6464
$this->prepareOnLogin = $prepareOnLogin;
6565
$this->prepareOnAccessDenied = $prepareOnAccessDenied;

0 commit comments

Comments
 (0)