From 9bc454f42501a89ce98860e1e9b7b774e555bf38 Mon Sep 17 00:00:00 2001 From: Mark Magyar <14284867+xHeaven@users.noreply.github.com> Date: Sun, 28 May 2023 18:58:39 +0200 Subject: [PATCH] use null coalescing assignment instead of just null coalescing --- lib/TwoFactorAuth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/TwoFactorAuth.php b/lib/TwoFactorAuth.php index f6c68d1..f3f867e 100644 --- a/lib/TwoFactorAuth.php +++ b/lib/TwoFactorAuth.php @@ -166,7 +166,7 @@ class TwoFactorAuth public function getQrCodeProvider(): IQRCodeProvider { // Set default QR Code provider if none was specified - return $this->qrcodeprovider ?? ($this->qrcodeprovider = new QRServerProvider()); + return $this->qrcodeprovider ??= new QRServerProvider(); } /** @@ -192,7 +192,7 @@ class TwoFactorAuth public function getTimeProvider(): ITimeProvider { // Set default time provider if none was specified - return $this->timeprovider ?? ($this->timeprovider = new LocalMachineTimeProvider()); + return $this->timeprovider ??= new LocalMachineTimeProvider(); } /**