fix phpcs findings

This commit is contained in:
Dennis Eichhorn 2019-09-12 19:48:00 +02:00
parent a30fde531a
commit c44ee5344f
21 changed files with 208 additions and 196 deletions

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Auditor\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Auditor\Admin\Install
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\DataStorage\Database\DatabasePool;
/**
* Navigation class.
*
* @package Modules\Auditor\Admin\Install
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Auditor\Admin\Install
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Navigation
{
@ -34,7 +34,7 @@ class Navigation
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public static function install(string $path, DatabasePool $dbPool) : void
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Auditor\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Auditor\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Module\InstallerAbstract;
/**
* Installer class.
*
* @package Modules\Auditor\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Auditor\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Installer extends InstallerAbstract
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Auditor\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Auditor\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Module\StatusAbstract;
/**
* Navigation class.
*
* @package Modules\Auditor\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Auditor\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Status extends StatusAbstract
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Auditor\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Auditor\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Module\UninstallerAbstract;
/**
* Uninstaller class.
*
* @package Modules\Auditor\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Auditor\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Uninstaller extends UninstallerAbstract
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Auditor\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Auditor\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Module\UpdaterAbstract;
/**
* Updater class.
*
* @package Modules\Auditor\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Auditor\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Updater extends UpdaterAbstract
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Auditor
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Auditor
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -23,10 +23,10 @@ use phpOMS\Utils\StringUtils;
/**
* Auditor api controller class.
*
* @package Modules\Auditor
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Auditor
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class ApiController extends Controller
{
@ -46,7 +46,7 @@ final class ApiController extends Controller
*
* @api
*
* @since 1.0.0
* @since 1.0.0
*/
public function apiLogCreate(
$account,
@ -81,7 +81,7 @@ final class ApiController extends Controller
*
* @api
*
* @since 1.0.0
* @since 1.0.0
*/
public function apiLogUpdate(
$account,
@ -117,7 +117,7 @@ final class ApiController extends Controller
*
* @api
*
* @since 1.0.0
* @since 1.0.0
*/
public function apiLogDelete(
$account,

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Auditor
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Auditor
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -26,21 +26,23 @@ use phpOMS\Views\View;
/**
* Calendar controller class.
*
* @package Modules\Auditor
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Auditor
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class BackendController extends Controller
{
/**
* Routing end-point for application behaviour.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewAuditorList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
@ -56,13 +58,15 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewAuditorSingle(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
@ -78,13 +82,15 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewAuditorModuleList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
@ -100,13 +106,15 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewAuditorModuleSingle(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
@ -122,13 +130,15 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewAuditorAccountList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
@ -143,13 +153,15 @@ final class BackendController extends Controller
}
/**
* Routing end-point for application behaviour.
*
* @param RequestAbstract $request Request
* @param ResponseAbstract $response Response
* @param mixed $data Generic data
*
* @return RenderableInterface
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function viewAuditorAccountSingle(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Auditor
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Auditor
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -21,10 +21,10 @@ use phpOMS\Module\WebInterface;
/**
* Calendar controller class.
*
* @package Modules\Auditor
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Auditor
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Controller extends ModuleAbstract implements WebInterface
{
@ -32,7 +32,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module path.
*
* @var string
* @var string
* @since 1.0.0
*/
public const MODULE_PATH = __DIR__ . '/../';
@ -40,7 +40,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module version.
*
* @var string
* @var string
* @since 1.0.0
*/
public const MODULE_VERSION = '1.0.0';
@ -48,7 +48,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module name.
*
* @var string
* @var string
* @since 1.0.0
*/
public const MODULE_NAME = 'Auditor';
@ -56,7 +56,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module id.
*
* @var int
* @var int
* @since 1.0.0
*/
public const MODULE_ID = 1006200000;
@ -64,7 +64,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Providing.
*
* @var string[]
* @var string[]
* @since 1.0.0
*/
protected static array $providing = [];
@ -72,7 +72,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Dependencies.
*
* @var string[]
* @var string[]
* @since 1.0.0
*/
protected static array $dependencies = [];

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Auditor
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Auditor
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,17 +19,17 @@ use phpOMS\Account\Account;
/**
* Audit class.
*
* @package Modules\Auditor
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Auditor
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Audit
{
/**
* Audit id.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $id = 0;
@ -37,7 +37,7 @@ class Audit
/**
* Audit type.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $type = 0;
@ -45,7 +45,7 @@ class Audit
/**
* Audit subtype.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $subtype = 0;
@ -53,7 +53,7 @@ class Audit
/**
* Audit module.
*
* @var null|string
* @var null|string
* @since 1.0.0
*/
private $module = null;
@ -63,7 +63,7 @@ class Audit
*
* This could be used to reference other model ids
*
* @var null|string
* @var null|string
* @since 1.0.0
*/
private $ref = null;
@ -73,7 +73,7 @@ class Audit
*
* Additional audit information
*
* @var null|string
* @var null|string
* @since 1.0.0
*/
private $content = null;
@ -81,7 +81,7 @@ class Audit
/**
* Old value.
*
* @var null|string
* @var null|string
* @since 1.0.0
*/
private $old = null;
@ -89,7 +89,7 @@ class Audit
/**
* New value.
*
* @var null|string
* @var null|string
* @since 1.0.0
*/
private $new = null;
@ -97,7 +97,7 @@ class Audit
/**
* Account.
*
* @var Account|int
* @var Account|int
* @since 1.0.0
*/
private $createdBy = 0;
@ -105,7 +105,7 @@ class Audit
/**
* Created at.
*
* @var null|\DateTime
* @var null|\DateTime
* @since 1.0.0
*/
private ?\DateTime $createdAt = null;
@ -113,7 +113,7 @@ class Audit
/**
* Ip of creator.
*
* @var int
* @var int
* @since 1.0.0
*/
private int $ip = 0;
@ -129,7 +129,7 @@ class Audit
* @parram string $module Module id
* @parram string $content Additional audit information
*
* @since 1.0.0
* @since 1.0.0
*/
public function __construct(
$account = 0,
@ -157,7 +157,7 @@ class Audit
*
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getId() : int
{
@ -169,7 +169,7 @@ class Audit
*
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getType() : int
{
@ -181,7 +181,7 @@ class Audit
*
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getSubType() : int
{
@ -193,7 +193,7 @@ class Audit
*
* @return null|string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getModule() : ?string
{
@ -207,7 +207,7 @@ class Audit
*
* @return null|string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getRef() : ?string
{
@ -219,7 +219,7 @@ class Audit
*
* @return null|string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getContent() : ?string
{
@ -231,7 +231,7 @@ class Audit
*
* @return null|string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getOld() : ?string
{
@ -243,7 +243,7 @@ class Audit
*
* @return null|string
*
* @since 1.0.0
* @since 1.0.0
*/
public function getNew() : ?string
{
@ -255,7 +255,7 @@ class Audit
*
* @return Account|int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getCreatedBy()
{
@ -267,7 +267,7 @@ class Audit
*
* @return \DateTime
*
* @since 1.0.0
* @since 1.0.0
*/
public function getCreatedAt() : \DateTime
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Auditor
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Auditor
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -20,10 +20,10 @@ use phpOMS\DataStorage\Database\DataMapperAbstract;
/**
* Mapper class.
*
* @package Modules\Auditor
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Auditor
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class AuditMapper extends DataMapperAbstract
{
@ -31,7 +31,7 @@ final class AuditMapper extends DataMapperAbstract
/**
* Columns.
*
* @var array<string, array<string, bool|string>>
* @var array<string, array<string, bool|string>>
* @since 1.0.0
*/
protected static array $columns = [
@ -51,7 +51,7 @@ final class AuditMapper extends DataMapperAbstract
/**
* Belongs to.
*
* @var array<string, array<string, string>>
* @var array<string, array<string, string>>
* @since 1.0.0
*/
protected static array $belongsTo = [
@ -64,7 +64,7 @@ final class AuditMapper extends DataMapperAbstract
/**
* Primary table.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $table = 'auditor_audit';
@ -72,7 +72,7 @@ final class AuditMapper extends DataMapperAbstract
/**
* Primary field name.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $primaryField = 'auditor_audit_id';
@ -80,7 +80,7 @@ final class AuditMapper extends DataMapperAbstract
/**
* Created at.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $createdAt = 'auditor_audit_created_at';

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Auditor
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Auditor
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -17,10 +17,10 @@ namespace Modules\Auditor\Models;
/**
* Null class.
*
* @package Modules\Auditor
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Auditor
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class NullAudit extends Audit
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Auditor
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Auditor
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Stdlib\Base\Enum;
/**
* Permision state enum.
*
* @package Modules\Auditor
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Auditor
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class PermissionState extends Enum
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
return ['Navigation' => [
'Create' => 'Create',

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
return ['Navigation' => [
]];

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
return ['Auditor' => [
'By' => 'By',

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
/**
* @var \phpOMS\Views\View $this

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
/**
* @var \phpOMS\Views\View $this

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
/**
* @var \phpOMS\Views\View $this

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
/**
* @var \phpOMS\Views\View $this

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
/**
* @var \phpOMS\Views\View $this

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package TBD
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
/**
* @var \phpOMS\Views\View $this