remove warning issues

This commit is contained in:
Daniel Seifert 2022-09-26 15:58:38 +02:00
parent 3f77b212b4
commit 337107fe52
Signed by: DanielS
GPG Key ID: 8A7C4C6ED1915C6F
6 changed files with 11 additions and 14 deletions

View File

@ -17,7 +17,6 @@ use BaconQrCode\Renderer\RendererInterface;
use BaconQrCode\Writer; use BaconQrCode\Writer;
use D3\Totp\Application\Factory\BaconQrCodeFactory; use D3\Totp\Application\Factory\BaconQrCodeFactory;
use D3\Totp\Application\Model\Exceptions\d3totp_wrongOtpException; use D3\Totp\Application\Model\Exceptions\d3totp_wrongOtpException;
use Doctrine\DBAL\DBALException;
use OTPHP\TOTP; use OTPHP\TOTP;
use OxidEsales\Eshop\Application\Model\User; use OxidEsales\Eshop\Application\Model\User;
use OxidEsales\Eshop\Core\Database\Adapter\DatabaseInterface; use OxidEsales\Eshop\Core\Database\Adapter\DatabaseInterface;
@ -89,7 +88,7 @@ class d3totp extends BaseModel
*/ */
public function getUser() public function getUser()
{ {
$userId = $this->userId ? $this->userId : $this->getFieldData('oxuserid'); $userId = $this->userId ?: $this->getFieldData('oxuserid');
$user = $this->d3GetUser(); $user = $this->d3GetUser();
$user->load($userId); $user->load($userId);

View File

@ -10,7 +10,7 @@
[{assign var="readonly" value=""}] [{assign var="readonly" value=""}]
[{/if}] [{/if}]
<style type="text/css"> <style>
td.edittext { td.edittext {
white-space: normal; white-space: normal;
} }

View File

@ -6,7 +6,7 @@
[{assign var="userid" value=$user->getId()}] [{assign var="userid" value=$user->getId()}]
[{$totp->loadByUserId($userid)}] [{$totp->loadByUserId($userid)}]
<style type="text/css"> <style>
.registerNew { .registerNew {
display: none; display: none;
} }

View File

@ -38,18 +38,16 @@ use OxidEsales\Eshop\Application\Model as OxidModel;
$sMetadataVersion = '2.0'; $sMetadataVersion = '2.0';
$sModuleId = 'd3totp'; $sModuleId = 'd3totp';
$logo = '<img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em">';
/** /**
* Module information * Module information
*/ */
$aModule = [ $aModule = [
'id' => $sModuleId, 'id' => $sModuleId,
'title' => [ 'title' => [
'de' => 'de' => $logo . 'Zwei-Faktor-Authentisierung',
'<svg style="height:1em;width:1em"><image xlink:href="https://logos.oxidmodule.com/d3logo.svg" style="height:1em;width:1em" /></svg> '. 'en' => $logo . 'two-factor authentication',
'Zwei-Faktor-Authentisierung',
'en' =>
'<svg style="height:1em;width:1em"><image xlink:href="https://logos.oxidmodule.com/d3logo.svg" style="height:1em;width:1em" /></svg> '.
'two-factor authentication',
], ],
'description' => [ 'description' => [
'de' => 'Zwei-Faktor-Authentisierung (TOTP) f&uuml;r OXID eSales Shop', 'de' => 'Zwei-Faktor-Authentisierung (TOTP) f&uuml;r OXID eSales Shop',

View File

@ -30,14 +30,14 @@ class d3_account_totpTest extends d3TotpUnitTestCase
/** /**
* setup basic requirements * setup basic requirements
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->_oController = oxNew(d3_account_totp::class); $this->_oController = oxNew(d3_account_totp::class);
} }
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();

View File

@ -33,14 +33,14 @@ class d3_totp_LoginControllerTest extends d3TotpUnitTestCase
/** /**
* setup basic requirements * setup basic requirements
*/ */
public function setUp() public function setUp(): void
{ {
parent::setUp(); parent::setUp();
$this->_oController = oxNew(d3_totp_LoginController::class); $this->_oController = oxNew(d3_totp_LoginController::class);
} }
public function tearDown() public function tearDown(): void
{ {
parent::tearDown(); parent::tearDown();