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 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);

View File

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

View File

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

View File

@ -38,18 +38,16 @@ use OxidEsales\Eshop\Application\Model as OxidModel;
$sMetadataVersion = '2.0';
$sModuleId = 'd3totp';
$logo = '<img src="https://logos.oxidmodule.com/d3logo.svg" alt="(D3)" style="height:1em;width:1em">';
/**
* Module information
*/
$aModule = [
'id' => $sModuleId,
'title' => [
'de' =>
'<svg style="height:1em;width:1em"><image xlink:href="https://logos.oxidmodule.com/d3logo.svg" style="height:1em;width:1em" /></svg> '.
'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',
'de' => $logo . 'Zwei-Faktor-Authentisierung',
'en' => $logo . 'two-factor authentication',
],
'description' => [
'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
*/
public function setUp()
public function setUp(): void
{
parent::setUp();
$this->_oController = oxNew(d3_account_totp::class);
}
public function tearDown()
public function tearDown(): void
{
parent::tearDown();

View File

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