improve code

This commit is contained in:
Daniel Seifert 2022-12-13 22:05:29 +01:00
parent c0727ba793
commit f16fbee5d8
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170
2 changed files with 1 additions and 92 deletions

View File

@ -36,9 +36,7 @@
"web-auth/webauthn-lib": "^3.3",
"nyholm/psr7": "^1.5.1",
"nyholm/psr7-server": "^1.0.2",
"ext-json": "*",
"ext-soap": "*",
"ext-PDO": "*"
"ext-json": "*"
},
"require-dev": {
"phpstan/phpstan": "^1.8"

View File

@ -1,89 +0,0 @@
<?php
namespace D3\Webauthn\Application\Controller\Traits;
use D3\Webauthn\Application\Model\Credential\PublicKeyCredential;
use D3\Webauthn\Application\Model\Credential\PublicKeyCredentialList;
use D3\Webauthn\Application\Model\Webauthn;
use OxidEsales\Eshop\Application\Model\User;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\Routing\ControllerClassNameResolver;
use OxidEsales\Eshop\Core\Session;
use OxidEsales\Eshop\Core\Utils;
use OxidEsales\Eshop\Core\UtilsView;
use Psr\Log\LoggerInterface;
trait helpersTrait
{
/**
* @return User
*/
public function d3GetUserObject(): User
{
return oxNew(User::class);
}
/**
* @return Webauthn
*/
public function d3GetWebauthnObject(): Webauthn
{
return oxNew(Webauthn::class);
}
/**
* @return LoggerInterface
*/
public function d3GetLoggerObject(): LoggerInterface
{
return Registry::getLogger();
}
/**
* @return Utils
*/
public function d3GetUtilsObject(): Utils
{
return Registry::getUtils();
}
/**
* @return UtilsView
*/
public function d3GetUtilsViewObject(): UtilsView
{
return Registry::getUtilsView();
}
/**
* @return PublicKeyCredentialList
*/
public function d3GetPublicKeyCredentialListObject(): PublicKeyCredentialList
{
return oxNew(PublicKeyCredentialList::class);
}
/**
* @return PublicKeyCredential
*/
public function d3GetPublicKeyCredentialObject(): PublicKeyCredential
{
return oxNew(PublicKeyCredential::class);
}
/**
* @return Session
*/
public function d3GetSession(): Session
{
return Registry::getSession();
}
/**
* @return ControllerClassNameResolver
*/
public function d3GetControllerClassNameResolver(): ControllerClassNameResolver
{
return Registry::getControllerClassNameResolver();
}
}