fix phpcs findings

This commit is contained in:
Dennis Eichhorn 2019-09-12 19:48:00 +02:00
parent 2fb9a04330
commit d34b0aac56
18 changed files with 170 additions and 170 deletions

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package Modules\Navigation\Admin * @package Modules\Navigation\Admin
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -24,10 +24,10 @@ use phpOMS\System\File\PathException;
/** /**
* Installer class. * Installer class.
* *
* @package Modules\Navigation\Admin * @package Modules\Navigation\Admin
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class Installer extends InstallerAbstract class Installer extends InstallerAbstract
{ {
@ -43,7 +43,7 @@ class Installer extends InstallerAbstract
* @throws PathException This exception is thrown if the Navigation install file couldn't be found * @throws PathException This exception is thrown if the Navigation install file couldn't be found
* @throws \Exception This exception is thrown if the Navigation install file is invalid json * @throws \Exception This exception is thrown if the Navigation install file is invalid json
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function installExternal(DatabasePool $dbPool, array $data) : void public static function installExternal(DatabasePool $dbPool, array $data) : void
{ {
@ -78,7 +78,7 @@ class Installer extends InstallerAbstract
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private static function installLink($dbPool, $data) : void private static function installLink($dbPool, $data) : void
{ {

View File

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

View File

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

View File

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

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package Modules\Navigation * @package Modules\Navigation
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -22,10 +22,10 @@ use phpOMS\Message\ResponseAbstract;
/** /**
* Navigation class. * Navigation class.
* *
* @package Modules\Navigation * @package Modules\Navigation
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class BackendController extends Controller final class BackendController extends Controller
{ {
@ -38,7 +38,7 @@ final class BackendController extends Controller
* *
* @return NavigationView * @return NavigationView
* *
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function createNavigationMid(int $pageId, RequestAbstract $request, ResponseAbstract $response) : NavigationView public function createNavigationMid(int $pageId, RequestAbstract $request, ResponseAbstract $response) : NavigationView
@ -66,7 +66,7 @@ final class BackendController extends Controller
* *
* @return NavigationView * @return NavigationView
* *
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function getView(RequestAbstract $request, ResponseAbstract $response) : NavigationView public function getView(RequestAbstract $request, ResponseAbstract $response) : NavigationView
@ -101,7 +101,7 @@ final class BackendController extends Controller
* @return void * @return void
* @todo: this is slow maybe cache it per user? or maybe push it into one large language file which is stored in this module? * @todo: this is slow maybe cache it per user? or maybe push it into one large language file which is stored in this module?
* *
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function loadLanguage(RequestAbstract $request, ResponseAbstract $response) : void public function loadLanguage(RequestAbstract $request, ResponseAbstract $response) : void
@ -131,7 +131,7 @@ final class BackendController extends Controller
* *
* @return NavigationView * @return NavigationView
* *
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
public function createNavigationSplash(int $pageId, RequestAbstract $request, ResponseAbstract $response) : NavigationView public function createNavigationSplash(int $pageId, RequestAbstract $request, ResponseAbstract $response) : NavigationView

View File

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

View File

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

View File

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

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package Modules\Navigation * @package Modules\Navigation
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\DataStorage\Database\DataMapperAbstract;
/** /**
* Mapper class. * Mapper class.
* *
* @package Modules\Navigation * @package Modules\Navigation
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
final class NavElementMapper extends DataMapperAbstract final class NavElementMapper extends DataMapperAbstract
{ {
@ -30,7 +30,7 @@ final class NavElementMapper extends DataMapperAbstract
/** /**
* Columns. * Columns.
* *
* @var array<string, array<string, bool|string>> * @var array<string, array<string, bool|string>>
* @since 1.0.0 * @since 1.0.0
*/ */
protected static array $columns = [ protected static array $columns = [
@ -53,7 +53,7 @@ final class NavElementMapper extends DataMapperAbstract
/** /**
* Primary table. * Primary table.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static string $table = 'nav'; protected static string $table = 'nav';
@ -61,7 +61,7 @@ final class NavElementMapper extends DataMapperAbstract
/** /**
* Primary field name. * Primary field name.
* *
* @var string * @var string
* @since 1.0.0 * @since 1.0.0
*/ */
protected static string $primaryField = 'nav_id'; protected static string $primaryField = 'nav_id';

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package Modules\Navigation\Models * @package Modules\Navigation\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -22,10 +22,10 @@ use phpOMS\Message\RequestAbstract;
/** /**
* Navigation class. * Navigation class.
* *
* @package Modules\Navigation\Models * @package Modules\Navigation\Models
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class Navigation class Navigation
{ {
@ -35,7 +35,7 @@ class Navigation
* *
* Array of all navigation elements sorted by type->parent->id * Array of all navigation elements sorted by type->parent->id
* *
* @var array * @var array
* @since 1.0.0 * @since 1.0.0
*/ */
private array $nav = []; private array $nav = [];
@ -43,7 +43,7 @@ class Navigation
/** /**
* Singleton instance. * Singleton instance.
* *
* @var \Modules\Navigation\Models\Navigation * @var \Modules\Navigation\Models\Navigation
* @since 1.0.0 * @since 1.0.0
*/ */
private static $instance = null; private static $instance = null;
@ -51,7 +51,7 @@ class Navigation
/** /**
* Database pool. * Database pool.
* *
* @var DatabasePool * @var DatabasePool
* @since 1.0.0 * @since 1.0.0
*/ */
private $dbPool = null; private $dbPool = null;
@ -65,7 +65,7 @@ class Navigation
* @param int $unit Unit * @param int $unit Unit
* @param string $appName App name * @param string $appName App name
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function __construct(RequestAbstract $request, Account $account, DatabasePool $dbPool, int $unit, string $appName) private function __construct(RequestAbstract $request, Account $account, DatabasePool $dbPool, int $unit, string $appName)
{ {
@ -83,7 +83,7 @@ class Navigation
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function load(array $hashes, Account $account, int $unit, string $app) : void private function load(array $hashes, Account $account, int $unit, string $app) : void
{ {
@ -133,7 +133,7 @@ class Navigation
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
private function setReadable(array &$nav, int $parent) : void private function setReadable(array &$nav, int $parent) : void
{ {
@ -162,7 +162,7 @@ class Navigation
* *
* @throws \Exception * @throws \Exception
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public static function getInstance(RequestAbstract $hashes = null, Account $account, DatabasePool $dbPool, int $unit, string $appName) public static function getInstance(RequestAbstract $hashes = null, Account $account, DatabasePool $dbPool, int $unit, string $appName)
{ {
@ -182,7 +182,7 @@ class Navigation
* *
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getNav() : array public function getNav() : array
{ {

View File

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

View File

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

View File

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

View File

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

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package TBD * @package TBD
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
use \Modules\Navigation\Models\LinkType; use \Modules\Navigation\Models\LinkType;
use \Modules\Navigation\Models\NavigationType; use \Modules\Navigation\Models\NavigationType;

View File

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

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package TBD * @package TBD
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
use Modules\Navigation\Models\NavigationType; use Modules\Navigation\Models\NavigationType;

View File

@ -4,11 +4,11 @@
* *
* PHP Version 7.4 * PHP Version 7.4
* *
* @package Modules\Navigation\Views * @package Modules\Navigation\Views
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 1.0
* @version 1.0.0 * @version 1.0.0
* @link https://orange-management.org * @link https://orange-management.org
*/ */
declare(strict_types=1); declare(strict_types=1);
@ -19,10 +19,10 @@ use phpOMS\Views\View;
/** /**
* Navigation view. * Navigation view.
* *
* @package Modules\Navigation\Views * @package Modules\Navigation\Views
* @license OMS License 1.0 * @license OMS License 1.0
* @link https://orange-management.org * @link https://orange-management.org
* @since 1.0.0 * @since 1.0.0
*/ */
class NavigationView extends View class NavigationView extends View
{ {
@ -33,7 +33,7 @@ class NavigationView extends View
* This is getting used in order to identify which navigation elements should get rendered. * This is getting used in order to identify which navigation elements should get rendered.
* This usually is the parent navigation id * This usually is the parent navigation id
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
protected int $navId = 0; protected int $navId = 0;
@ -41,7 +41,7 @@ class NavigationView extends View
/** /**
* Navigation. * Navigation.
* *
* @var mixed[] * @var mixed[]
* @since 1.0.0 * @since 1.0.0
*/ */
protected array $nav = []; protected array $nav = [];
@ -49,7 +49,7 @@ class NavigationView extends View
/** /**
* Parent element used for navigation. * Parent element used for navigation.
* *
* @var int * @var int
* @since 1.0.0 * @since 1.0.0
*/ */
protected int $parent = 0; protected int $parent = 0;
@ -59,7 +59,7 @@ class NavigationView extends View
* *
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getNavId() : int public function getNavId() : int
{ {
@ -73,7 +73,7 @@ class NavigationView extends View
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setNavId(int $navId) : void public function setNavId(int $navId) : void
{ {
@ -83,7 +83,7 @@ class NavigationView extends View
/** /**
* @return array * @return array
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getNav() : array public function getNav() : array
{ {
@ -95,7 +95,7 @@ class NavigationView extends View
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setNav(array $nav) : void public function setNav(array $nav) : void
{ {
@ -105,7 +105,7 @@ class NavigationView extends View
/** /**
* @return int * @return int
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function getParent() : int public function getParent() : int
{ {
@ -117,7 +117,7 @@ class NavigationView extends View
* *
* @return void * @return void
* *
* @since 1.0.0 * @since 1.0.0
*/ */
public function setParent(int $parent) : void public function setParent(int $parent) : void
{ {