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
*
* @package Modules\Navigation\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Navigation\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -24,10 +24,10 @@ use phpOMS\System\File\PathException;
/**
* Installer class.
*
* @package Modules\Navigation\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Navigation\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
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 \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
{
@ -78,7 +78,7 @@ class Installer extends InstallerAbstract
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
private static function installLink($dbPool, $data) : void
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Navigation\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Navigation\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\Navigation\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Navigation\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\Navigation\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Navigation\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\Navigation\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Navigation\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\Navigation\Admin
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Navigation\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\Navigation\Admin
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Navigation\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\Navigation
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Navigation
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
@ -22,10 +22,10 @@ use phpOMS\Message\ResponseAbstract;
/**
* Navigation class.
*
* @package Modules\Navigation
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Navigation
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class BackendController extends Controller
{
@ -38,7 +38,7 @@ final class BackendController extends Controller
*
* @return NavigationView
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function createNavigationMid(int $pageId, RequestAbstract $request, ResponseAbstract $response) : NavigationView
@ -66,7 +66,7 @@ final class BackendController extends Controller
*
* @return NavigationView
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function getView(RequestAbstract $request, ResponseAbstract $response) : NavigationView
@ -101,7 +101,7 @@ final class BackendController extends Controller
* @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?
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function loadLanguage(RequestAbstract $request, ResponseAbstract $response) : void
@ -131,7 +131,7 @@ final class BackendController extends Controller
*
* @return NavigationView
*
* @since 1.0.0
* @since 1.0.0
* @codeCoverageIgnore
*/
public function createNavigationSplash(int $pageId, RequestAbstract $request, ResponseAbstract $response) : NavigationView

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Navigation
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Navigation
* @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;
/**
* Navigation class.
*
* @package Modules\Navigation
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Navigation
* @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 = 'Navigation';
@ -56,7 +56,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Module id.
*
* @var int
* @var int
* @since 1.0.0
*/
public const MODULE_ID = 1000500000;
@ -64,7 +64,7 @@ class Controller extends ModuleAbstract implements WebInterface
/**
* Providing.
*
* @var string[]
* @var string[]
* @since 1.0.0
*/
protected static array $providing = [
@ -73,7 +73,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\Navigation\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Navigation\Models
* @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;
/**
* Link type enum.
*
* @package Modules\Navigation\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Navigation\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class LinkType extends Enum
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Navigation\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Navigation\Models
* @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\Navigation\Models;
/**
* Navigation element class.
*
* @package Modules\Navigation\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Navigation\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class NavElement
{

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Navigation
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Navigation
* @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\DataMapperAbstract;
/**
* Mapper class.
*
* @package Modules\Navigation
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Navigation
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
final class NavElementMapper extends DataMapperAbstract
{
@ -30,7 +30,7 @@ final class NavElementMapper 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 = [
@ -53,7 +53,7 @@ final class NavElementMapper extends DataMapperAbstract
/**
* Primary table.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $table = 'nav';
@ -61,7 +61,7 @@ final class NavElementMapper extends DataMapperAbstract
/**
* Primary field name.
*
* @var string
* @var string
* @since 1.0.0
*/
protected static string $primaryField = 'nav_id';

View File

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

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Navigation\Models
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Navigation\Models
* @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;
/**
* Navigation type enum.
*
* @package Modules\Navigation\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Navigation\Models
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
abstract class NavigationType extends Enum
{

View File

@ -4,10 +4,10 @@
*
* 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
*/
/**
* @var \Modules\Navigation\Views\NavigationView $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 \Modules\Navigation\Views\NavigationView $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
*/
use \Modules\Navigation\Models\LinkType;
use \Modules\Navigation\Models\NavigationType;

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 \Modules\Navigation\Views\NavigationView $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
*/
use Modules\Navigation\Models\NavigationType;

View File

@ -4,11 +4,11 @@
*
* PHP Version 7.4
*
* @package Modules\Navigation\Views
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
* @package Modules\Navigation\Views
* @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\Views\View;
/**
* Navigation view.
*
* @package Modules\Navigation\Views
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
* @package Modules\Navigation\Views
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
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 usually is the parent navigation id
*
* @var int
* @var int
* @since 1.0.0
*/
protected int $navId = 0;
@ -41,7 +41,7 @@ class NavigationView extends View
/**
* Navigation.
*
* @var mixed[]
* @var mixed[]
* @since 1.0.0
*/
protected array $nav = [];
@ -49,7 +49,7 @@ class NavigationView extends View
/**
* Parent element used for navigation.
*
* @var int
* @var int
* @since 1.0.0
*/
protected int $parent = 0;
@ -59,7 +59,7 @@ class NavigationView extends View
*
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getNavId() : int
{
@ -73,7 +73,7 @@ class NavigationView extends View
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setNavId(int $navId) : void
{
@ -83,7 +83,7 @@ class NavigationView extends View
/**
* @return array
*
* @since 1.0.0
* @since 1.0.0
*/
public function getNav() : array
{
@ -95,7 +95,7 @@ class NavigationView extends View
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setNav(array $nav) : void
{
@ -105,7 +105,7 @@ class NavigationView extends View
/**
* @return int
*
* @since 1.0.0
* @since 1.0.0
*/
public function getParent() : int
{
@ -117,7 +117,7 @@ class NavigationView extends View
*
* @return void
*
* @since 1.0.0
* @since 1.0.0
*/
public function setParent(int $parent) : void
{