From 337107fe5269bbf07c90a27de9ab960f03cec7c1 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Mon, 26 Sep 2022 15:58:38 +0200 Subject: [PATCH] remove warning issues --- src/Application/Model/d3totp.php | 3 +-- src/Application/views/admin/tpl/d3user_totp.tpl | 2 +- src/Application/views/tpl/d3_account_totp.tpl | 2 +- src/metadata.php | 10 ++++------ .../Application/Controller/d3_account_totpTest.php | 4 ++-- .../Controller/Admin/d3_totp_LoginControllerTest.php | 4 ++-- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/Application/Model/d3totp.php b/src/Application/Model/d3totp.php index 04041dd..99960ce 100644 --- a/src/Application/Model/d3totp.php +++ b/src/Application/Model/d3totp.php @@ -17,7 +17,6 @@ use BaconQrCode\Renderer\RendererInterface; use BaconQrCode\Writer; use D3\Totp\Application\Factory\BaconQrCodeFactory; use D3\Totp\Application\Model\Exceptions\d3totp_wrongOtpException; -use Doctrine\DBAL\DBALException; use OTPHP\TOTP; use OxidEsales\Eshop\Application\Model\User; use OxidEsales\Eshop\Core\Database\Adapter\DatabaseInterface; @@ -89,7 +88,7 @@ class d3totp extends BaseModel */ public function getUser() { - $userId = $this->userId ? $this->userId : $this->getFieldData('oxuserid'); + $userId = $this->userId ?: $this->getFieldData('oxuserid'); $user = $this->d3GetUser(); $user->load($userId); diff --git a/src/Application/views/admin/tpl/d3user_totp.tpl b/src/Application/views/admin/tpl/d3user_totp.tpl index e0e521d..ff09173 100644 --- a/src/Application/views/admin/tpl/d3user_totp.tpl +++ b/src/Application/views/admin/tpl/d3user_totp.tpl @@ -10,7 +10,7 @@ [{assign var="readonly" value=""}] [{/if}] -