From d34b0aac561b9fe271903d6d308f447203adfbd5 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 12 Sep 2019 19:48:00 +0200 Subject: [PATCH] fix phpcs findings --- Admin/Installer.php | 22 +++++++++---------- Admin/Status.php | 18 ++++++++-------- Admin/Uninstaller.php | 18 ++++++++-------- Admin/Updater.php | 18 ++++++++-------- Controller/BackendController.php | 26 +++++++++++------------ Controller/Controller.php | 30 +++++++++++++------------- Models/LinkType.php | 18 ++++++++-------- Models/NavElement.php | 18 ++++++++-------- Models/NavElementMapper.php | 24 ++++++++++----------- Models/Navigation.php | 34 +++++++++++++++--------------- Models/NavigationType.php | 18 ++++++++-------- Theme/Backend/Lang/en.lang.php | 10 ++++----- Theme/Backend/mid-side.tpl.php | 10 ++++----- Theme/Backend/mid.tpl.php | 10 ++++----- Theme/Backend/side.tpl.php | 10 ++++----- Theme/Backend/splash.tpl.php | 10 ++++----- Theme/Backend/top.tpl.php | 10 ++++----- Views/NavigationView.php | 36 ++++++++++++++++---------------- 18 files changed, 170 insertions(+), 170 deletions(-) diff --git a/Admin/Installer.php b/Admin/Installer.php index a78c4a0..e9d1c70 100644 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -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 { diff --git a/Admin/Status.php b/Admin/Status.php index fa6a3ea..2245b92 100644 --- a/Admin/Status.php +++ b/Admin/Status.php @@ -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 { diff --git a/Admin/Uninstaller.php b/Admin/Uninstaller.php index 6640131..7afe035 100644 --- a/Admin/Uninstaller.php +++ b/Admin/Uninstaller.php @@ -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 { diff --git a/Admin/Updater.php b/Admin/Updater.php index 3ad33ef..3c1fe10 100644 --- a/Admin/Updater.php +++ b/Admin/Updater.php @@ -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 { diff --git a/Controller/BackendController.php b/Controller/BackendController.php index c2cd52e..40a13e7 100644 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -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 diff --git a/Controller/Controller.php b/Controller/Controller.php index 5d48f4f..3219a6a 100644 --- a/Controller/Controller.php +++ b/Controller/Controller.php @@ -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 = []; diff --git a/Models/LinkType.php b/Models/LinkType.php index 3da693c..f5792a2 100644 --- a/Models/LinkType.php +++ b/Models/LinkType.php @@ -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 { diff --git a/Models/NavElement.php b/Models/NavElement.php index e835715..9dcf6f6 100644 --- a/Models/NavElement.php +++ b/Models/NavElement.php @@ -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 { diff --git a/Models/NavElementMapper.php b/Models/NavElementMapper.php index 3c05530..2a3ffcc 100644 --- a/Models/NavElementMapper.php +++ b/Models/NavElementMapper.php @@ -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> + * @var array> * @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'; diff --git a/Models/Navigation.php b/Models/Navigation.php index 29de43c..8a443dd 100644 --- a/Models/Navigation.php +++ b/Models/Navigation.php @@ -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 { diff --git a/Models/NavigationType.php b/Models/NavigationType.php index 4b8e908..1941911 100644 --- a/Models/NavigationType.php +++ b/Models/NavigationType.php @@ -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 { diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index 615458e..76d2bed 100644 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -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' => []]; diff --git a/Theme/Backend/mid-side.tpl.php b/Theme/Backend/mid-side.tpl.php index 652b9e5..aa953b9 100644 --- a/Theme/Backend/mid-side.tpl.php +++ b/Theme/Backend/mid-side.tpl.php @@ -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 diff --git a/Theme/Backend/mid.tpl.php b/Theme/Backend/mid.tpl.php index dcc12c2..635a0db 100644 --- a/Theme/Backend/mid.tpl.php +++ b/Theme/Backend/mid.tpl.php @@ -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 diff --git a/Theme/Backend/side.tpl.php b/Theme/Backend/side.tpl.php index 63966d4..6c9fc76 100644 --- a/Theme/Backend/side.tpl.php +++ b/Theme/Backend/side.tpl.php @@ -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; diff --git a/Theme/Backend/splash.tpl.php b/Theme/Backend/splash.tpl.php index 1bdc8be..f30fcec 100644 --- a/Theme/Backend/splash.tpl.php +++ b/Theme/Backend/splash.tpl.php @@ -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 diff --git a/Theme/Backend/top.tpl.php b/Theme/Backend/top.tpl.php index 8caa4e9..3942bc8 100644 --- a/Theme/Backend/top.tpl.php +++ b/Theme/Backend/top.tpl.php @@ -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; diff --git a/Views/NavigationView.php b/Views/NavigationView.php index 4915e54..44ac18c 100644 --- a/Views/NavigationView.php +++ b/Views/NavigationView.php @@ -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 {