From ce70b6d7f2d72b3b1f9a27aec691290d39fe184c 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/Install/Navigation.php | 20 +++++++-------- Admin/Installer.php | 18 +++++++------- Admin/Status.php | 18 +++++++------- Admin/Uninstaller.php | 18 +++++++------- Admin/Updater.php | 18 +++++++------- Controller/BackendController.php | 30 ++++++++++++++--------- Controller/Controller.php | 30 +++++++++++------------ Models/Answer.php | 24 +++++++++--------- Models/PermissionState.php | 18 +++++++------- Models/Question.php | 24 +++++++++--------- Models/Section.php | 28 ++++++++++----------- Models/Survey.php | 28 ++++++++++----------- Theme/Backend/Lang/Navigation.en.lang.php | 10 ++++---- Theme/Backend/Lang/api.en.lang.php | 10 ++++---- Theme/Backend/Lang/en.lang.php | 10 ++++---- Theme/Backend/surveys-create.tpl.php | 10 ++++---- Theme/Backend/surveys-list.tpl.php | 10 ++++---- Theme/Backend/surveys-profile.tpl.php | 10 ++++---- 18 files changed, 170 insertions(+), 164 deletions(-) diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php index c264b76..657bec4 100644 --- a/Admin/Install/Navigation.php +++ b/Admin/Install/Navigation.php @@ -4,11 +4,11 @@ * * PHP Version 7.4 * - * @package Modules\Surveys\Admin\Install - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link https://orange-management.org + * @package Modules\Surveys\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\Surveys\Admin\Install - * @license OMS License 1.0 - * @link https://orange-management.org - * @since 1.0.0 + * @package Modules\Surveys\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 { diff --git a/Admin/Installer.php b/Admin/Installer.php index 930ce52..995f342 100644 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -4,11 +4,11 @@ * * PHP Version 7.4 * - * @package Modules\Surveys\Admin - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link https://orange-management.org + * @package Modules\Surveys\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\Surveys\Admin - * @license OMS License 1.0 - * @link https://orange-management.org - * @since 1.0.0 + * @package Modules\Surveys\Admin + * @license OMS License 1.0 + * @link https://orange-management.org + * @since 1.0.0 */ class Installer extends InstallerAbstract { diff --git a/Admin/Status.php b/Admin/Status.php index 35930e7..0252668 100644 --- a/Admin/Status.php +++ b/Admin/Status.php @@ -4,11 +4,11 @@ * * PHP Version 7.4 * - * @package Modules\Surveys\Admin - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link https://orange-management.org + * @package Modules\Surveys\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\Surveys\Admin - * @license OMS License 1.0 - * @link https://orange-management.org - * @since 1.0.0 + * @package Modules\Surveys\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 6a13ced..f099239 100644 --- a/Admin/Uninstaller.php +++ b/Admin/Uninstaller.php @@ -4,11 +4,11 @@ * * PHP Version 7.4 * - * @package Modules\Surveys\Admin - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link https://orange-management.org + * @package Modules\Surveys\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\Surveys\Admin - * @license OMS License 1.0 - * @link https://orange-management.org - * @since 1.0.0 + * @package Modules\Surveys\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 3bdaa06..b6f41e7 100644 --- a/Admin/Updater.php +++ b/Admin/Updater.php @@ -4,11 +4,11 @@ * * PHP Version 7.4 * - * @package Modules\Surveys\Admin - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link https://orange-management.org + * @package Modules\Surveys\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\Surveys\Admin - * @license OMS License 1.0 - * @link https://orange-management.org - * @since 1.0.0 + * @package Modules\Surveys\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 92de508..7626f37 100644 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -4,11 +4,11 @@ * * PHP Version 7.4 * - * @package Modules\Surveys - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link https://orange-management.org + * @package Modules\Surveys + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link https://orange-management.org */ declare(strict_types=1); @@ -22,22 +22,24 @@ use phpOMS\Views\View; /** * Surveys controller class. * - * @package Modules\Surveys - * @license OMS License 1.0 - * @link https://orange-management.org - * @since 1.0.0 + * @package Modules\Surveys + * @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 viewSurveysList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface @@ -50,13 +52,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 viewSurveysCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface @@ -69,13 +73,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 viewSurveysProfile(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface diff --git a/Controller/Controller.php b/Controller/Controller.php index b3e2af9..401a814 100644 --- a/Controller/Controller.php +++ b/Controller/Controller.php @@ -4,11 +4,11 @@ * * PHP Version 7.4 * - * @package Modules\Surveys - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link https://orange-management.org + * @package Modules\Surveys + * @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\Module\WebInterface; /** * Surveys controller class. * - * @package Modules\Surveys - * @license OMS License 1.0 - * @link https://orange-management.org - * @since 1.0.0 + * @package Modules\Surveys + * @license OMS License 1.0 + * @link https://orange-management.org + * @since 1.0.0 */ class Controller extends ModuleAbstract implements WebInterface { @@ -31,7 +31,7 @@ class Controller extends ModuleAbstract implements WebInterface /** * Module path. * - * @var string + * @var string * @since 1.0.0 */ public const MODULE_PATH = __DIR__ . '/../'; @@ -39,7 +39,7 @@ class Controller extends ModuleAbstract implements WebInterface /** * Module version. * - * @var string + * @var string * @since 1.0.0 */ public const MODULE_VERSION = '1.0.0'; @@ -47,7 +47,7 @@ class Controller extends ModuleAbstract implements WebInterface /** * Module name. * - * @var string + * @var string * @since 1.0.0 */ public const MODULE_NAME = 'Surveys'; @@ -55,7 +55,7 @@ class Controller extends ModuleAbstract implements WebInterface /** * Module id. * - * @var int + * @var int * @since 1.0.0 */ public const MODULE_ID = 1000800000; @@ -63,7 +63,7 @@ class Controller extends ModuleAbstract implements WebInterface /** * Providing. * - * @var string[] + * @var string[] * @since 1.0.0 */ protected static array $providing = []; @@ -71,7 +71,7 @@ class Controller extends ModuleAbstract implements WebInterface /** * Dependencies. * - * @var string[] + * @var string[] * @since 1.0.0 */ protected static array $dependencies = []; diff --git a/Models/Answer.php b/Models/Answer.php index 85fe848..2f148d0 100644 --- a/Models/Answer.php +++ b/Models/Answer.php @@ -4,11 +4,11 @@ * * PHP Version 7.4 * - * @package Modules\Surveys - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link https://orange-management.org + * @package Modules\Surveys + * @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\Surveys\Models; /** * Answer class. * - * @package Modules\Surveys - * @license OMS License 1.0 - * @link https://orange-management.org - * @since 1.0.0 + * @package Modules\Surveys + * @license OMS License 1.0 + * @link https://orange-management.org + * @since 1.0.0 */ class Answer { @@ -28,7 +28,7 @@ class Answer /** * ID. * - * @var int + * @var int * @since 1.0.0 */ private int $id = 0; @@ -36,7 +36,7 @@ class Answer /** * Name. * - * @var string + * @var string * @since 1.0.0 */ private string $name = ''; @@ -44,7 +44,7 @@ class Answer /** * Description. * - * @var string + * @var string * @since 1.0.0 */ private string $description = ''; diff --git a/Models/PermissionState.php b/Models/PermissionState.php index 90c46c4..c3e2fd4 100644 --- a/Models/PermissionState.php +++ b/Models/PermissionState.php @@ -4,11 +4,11 @@ * * PHP Version 7.4 * - * @package Modules\Surveys - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link https://orange-management.org + * @package Modules\Surveys + * @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\Surveys - * @license OMS License 1.0 - * @link https://orange-management.org - * @since 1.0.0 + * @package Modules\Surveys + * @license OMS License 1.0 + * @link https://orange-management.org + * @since 1.0.0 */ abstract class PermissionState extends Enum { diff --git a/Models/Question.php b/Models/Question.php index e9eb8c2..25ca33f 100644 --- a/Models/Question.php +++ b/Models/Question.php @@ -4,11 +4,11 @@ * * PHP Version 7.4 * - * @package Modules\Surveys - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link https://orange-management.org + * @package Modules\Surveys + * @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\Surveys\Models; /** * Question class. * - * @package Modules\Surveys - * @license OMS License 1.0 - * @link https://orange-management.org - * @since 1.0.0 + * @package Modules\Surveys + * @license OMS License 1.0 + * @link https://orange-management.org + * @since 1.0.0 */ class Question { @@ -28,7 +28,7 @@ class Question /** * ID. * - * @var int + * @var int * @since 1.0.0 */ private int $id = 0; @@ -36,7 +36,7 @@ class Question /** * Name. * - * @var string + * @var string * @since 1.0.0 */ private string $name = ''; @@ -44,7 +44,7 @@ class Question /** * Description. * - * @var string + * @var string * @since 1.0.0 */ private string $description = ''; diff --git a/Models/Section.php b/Models/Section.php index db1a958..6d4af29 100644 --- a/Models/Section.php +++ b/Models/Section.php @@ -4,11 +4,11 @@ * * PHP Version 7.4 * - * @package Modules\Surveys - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link https://orange-management.org + * @package Modules\Surveys + * @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\Surveys\Models; /** * Section class. * - * @package Modules\Surveys - * @license OMS License 1.0 - * @link https://orange-management.org - * @since 1.0.0 + * @package Modules\Surveys + * @license OMS License 1.0 + * @link https://orange-management.org + * @since 1.0.0 */ class Section { @@ -28,7 +28,7 @@ class Section /** * ID. * - * @var int + * @var int * @since 1.0.0 */ private int $id = 0; @@ -36,7 +36,7 @@ class Section /** * Name. * - * @var string + * @var string * @since 1.0.0 */ private string $name = ''; @@ -44,7 +44,7 @@ class Section /** * Description. * - * @var string + * @var string * @since 1.0.0 */ private string $description = ''; @@ -119,7 +119,7 @@ class Section * * @return void * - * @since 1.0.0 + * @since 1.0.0 */ public function init($id) : void { @@ -129,7 +129,7 @@ class Section /** * Overwriting clone in order to maintain singleton pattern. * - * @since 1.0.0 + * @since 1.0.0 */ public function __clone() { diff --git a/Models/Survey.php b/Models/Survey.php index a56825d..c215128 100644 --- a/Models/Survey.php +++ b/Models/Survey.php @@ -4,11 +4,11 @@ * * PHP Version 7.4 * - * @package Modules\Surveys - * @copyright Dennis Eichhorn - * @license OMS License 1.0 - * @version 1.0.0 - * @link https://orange-management.org + * @package Modules\Surveys + * @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\Surveys\Models; /** * Survey class. * - * @package Modules\Surveys - * @license OMS License 1.0 - * @link https://orange-management.org - * @since 1.0.0 + * @package Modules\Surveys + * @license OMS License 1.0 + * @link https://orange-management.org + * @since 1.0.0 */ class Survey { @@ -28,7 +28,7 @@ class Survey /** * ID. * - * @var int + * @var int * @since 1.0.0 */ private int $id = 0; @@ -36,7 +36,7 @@ class Survey /** * Name. * - * @var string + * @var string * @since 1.0.0 */ private string $name = ''; @@ -44,7 +44,7 @@ class Survey /** * Description. * - * @var string + * @var string * @since 1.0.0 */ private string $description = ''; @@ -52,7 +52,7 @@ class Survey /** * Created. * - * @var datetime + * @var datetime * @since 1.0.0 */ private $created = null; @@ -60,7 +60,7 @@ class Survey /** * Creator. * - * @var int + * @var int * @since 1.0.0 */ private int $creator = null; diff --git a/Theme/Backend/Lang/Navigation.en.lang.php b/Theme/Backend/Lang/Navigation.en.lang.php index 90d86df..b319384 100644 --- a/Theme/Backend/Lang/Navigation.en.lang.php +++ b/Theme/Backend/Lang/Navigation.en.lang.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 */ return ['Navigation' => [ 'Surveys' => 'Surveys', diff --git a/Theme/Backend/Lang/api.en.lang.php b/Theme/Backend/Lang/api.en.lang.php index 1afe44f..07bb1f6 100644 --- a/Theme/Backend/Lang/api.en.lang.php +++ b/Theme/Backend/Lang/api.en.lang.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 */ $MODLANG[1] = [ ]; diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index 481693a..937b404 100644 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.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 */ return ['Surveys' => [ 'Additional' => 'Additional', diff --git a/Theme/Backend/surveys-create.tpl.php b/Theme/Backend/surveys-create.tpl.php index 1a00485..35dfae9 100644 --- a/Theme/Backend/surveys-create.tpl.php +++ b/Theme/Backend/surveys-create.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 */ echo $this->getData('nav')->render(); ?> diff --git a/Theme/Backend/surveys-list.tpl.php b/Theme/Backend/surveys-list.tpl.php index 1cc0df3..50eee8f 100644 --- a/Theme/Backend/surveys-list.tpl.php +++ b/Theme/Backend/surveys-list.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 */ $footerView = new \phpOMS\Views\PaginationView($this->app, $this->request, $this->response); diff --git a/Theme/Backend/surveys-profile.tpl.php b/Theme/Backend/surveys-profile.tpl.php index eac9e78..09b6db5 100644 --- a/Theme/Backend/surveys-profile.tpl.php +++ b/Theme/Backend/surveys-profile.tpl.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 */ echo $this->getData('nav')->render();