From 5ad9272598ba6cb8c1e8bb09b312085b692e76e1 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 6 Oct 2019 17:50:12 +0200 Subject: [PATCH] phpcs fixes --- Models/Category.php | 44 +++++++++++--- Models/Cause.php | 44 +++++++++++--- Models/Department.php | 19 ++++-- Models/Process.php | 44 +++++++++++--- Models/Project.php | 19 ++++-- Models/Risk.php | 70 ++++++++++++++++++++--- Models/RiskObject.php | 44 +++++++++++--- Models/Solution.php | 44 +++++++++++--- Theme/Backend/Lang/Navigation.en.lang.php | 4 +- Theme/Backend/Lang/en.lang.php | 4 +- Theme/Backend/category-list.tpl.php | 4 +- Theme/Backend/category-single.tpl.php | 4 +- Theme/Backend/cause-create.tpl.php | 4 +- Theme/Backend/cause-list.tpl.php | 4 +- Theme/Backend/cause-single.tpl.php | 4 +- Theme/Backend/cockpit.tpl.php | 4 +- Theme/Backend/department-list.tpl.php | 4 +- Theme/Backend/department-single.tpl.php | 4 +- Theme/Backend/process-list.tpl.php | 4 +- Theme/Backend/process-single.tpl.php | 4 +- Theme/Backend/project-list.tpl.php | 4 +- Theme/Backend/project-single.tpl.php | 4 +- Theme/Backend/risk-create.tpl.php | 4 +- Theme/Backend/risk-list.tpl.php | 4 +- Theme/Backend/risk-single.tpl.php | 4 +- Theme/Backend/settings-dashboard.tpl.php | 4 +- Theme/Backend/solution-create.tpl.php | 4 +- Theme/Backend/solution-list.tpl.php | 4 +- Theme/Backend/solution-single.tpl.php | 4 +- Theme/Backend/unit-list.tpl.php | 4 +- Theme/Backend/unit-single.tpl.php | 4 +- 31 files changed, 335 insertions(+), 85 deletions(-) diff --git a/Models/Category.php b/Models/Category.php index caa7628..5407f58 100644 --- a/Models/Category.php +++ b/Models/Category.php @@ -24,13 +24,29 @@ namespace Modules\RiskManagement\Models; */ class Category { - private $id = 0; + /** + * ID. + * + * @var int + * @since 1.0.0 + */ + protected int $id = 0; private $title = ''; - - private $description = ''; - - private $descriptionRaw = ''; + /** + * Description. + * + * @var string + * @since 1.0.0 + */ + private string $description = ''; + /** + * Description. + * + * @var string + * @since 1.0.0 + */ + private string $descriptionRaw = ''; private $parent = null; @@ -38,10 +54,13 @@ class Category private $deputy = null; - public function __construct() - { - } - + /** + * Get id. + * + * @return int Model id + * + * @since 1.0.0 + */ public function getId() : int { return $this->id; @@ -87,6 +106,13 @@ class Category $this->title = $title; } + /** + * Get description + * + * @return string + * + * @since 1.0.0 + */ public function getDescription() : string { return $this->description; diff --git a/Models/Cause.php b/Models/Cause.php index ddac061..4978325 100644 --- a/Models/Cause.php +++ b/Models/Cause.php @@ -24,13 +24,29 @@ namespace Modules\RiskManagement\Models; */ class Cause { - private $id = 0; + /** + * ID. + * + * @var int + * @since 1.0.0 + */ + protected int $id = 0; private $title = ''; - - private $description = ''; - - private $descriptionRaw = ''; + /** + * Description. + * + * @var string + * @since 1.0.0 + */ + private string $description = ''; + /** + * Description. + * + * @var string + * @since 1.0.0 + */ + private string $descriptionRaw = ''; private $probability = 0; @@ -40,10 +56,13 @@ class Cause private $category = null; - public function __construct() - { - } - + /** + * Get id. + * + * @return int Model id + * + * @since 1.0.0 + */ public function getId() : int { return $this->id; @@ -99,6 +118,13 @@ class Cause $this->title = $title; } + /** + * Get description + * + * @return string + * + * @since 1.0.0 + */ public function getDescription() : string { return $this->description; diff --git a/Models/Department.php b/Models/Department.php index bc668ac..f93640d 100644 --- a/Models/Department.php +++ b/Models/Department.php @@ -26,7 +26,13 @@ use Modules\Organization\Models\NullDepartment as NullOrgDepartment; */ class Department { - private $id = 0; + /** + * ID. + * + * @var int + * @since 1.0.0 + */ + protected int $id = 0; private $department = null; @@ -34,10 +40,13 @@ class Department private $deputy = null; - public function __construct() - { - } - + /** + * Get id. + * + * @return int Model id + * + * @since 1.0.0 + */ public function getId() : int { return $this->id; diff --git a/Models/Process.php b/Models/Process.php index 7c8f1ca..9c4fe0d 100644 --- a/Models/Process.php +++ b/Models/Process.php @@ -24,13 +24,29 @@ namespace Modules\RiskManagement\Models; */ class Process { - private $id = 0; + /** + * ID. + * + * @var int + * @since 1.0.0 + */ + protected int $id = 0; private $title = ''; - - private $description = ''; - - private $descriptionRaw = ''; + /** + * Description. + * + * @var string + * @since 1.0.0 + */ + private string $description = ''; + /** + * Description. + * + * @var string + * @since 1.0.0 + */ + private string $descriptionRaw = ''; private $department = null; @@ -40,10 +56,13 @@ class Process private $unit = 1; - public function __construct() - { - } - + /** + * Get id. + * + * @return int Model id + * + * @since 1.0.0 + */ public function getId() : int { return $this->id; @@ -59,6 +78,13 @@ class Process $this->title = $title; } + /** + * Get description + * + * @return string + * + * @since 1.0.0 + */ public function getDescription() : string { return $this->description; diff --git a/Models/Project.php b/Models/Project.php index 81a7e8b..e498a06 100644 --- a/Models/Project.php +++ b/Models/Project.php @@ -24,7 +24,13 @@ namespace Modules\RiskManagement\Models; */ class Project { - private $id = 0; + /** + * ID. + * + * @var int + * @since 1.0.0 + */ + protected int $id = 0; private $project = null; @@ -32,10 +38,13 @@ class Project private $deputy = null; - public function __construct() - { - } - + /** + * Get id. + * + * @return int Model id + * + * @since 1.0.0 + */ public function getId() : int { return $this->id; diff --git a/Models/Risk.php b/Models/Risk.php index 8501bf6..cd98a99 100644 --- a/Models/Risk.php +++ b/Models/Risk.php @@ -24,13 +24,34 @@ namespace Modules\RiskManagement\Models; */ class Risk { - private $id = 0; - - private $name = ''; - - private $description = ''; - - private $descriptionRaw = ''; + /** + * ID. + * + * @var int + * @since 1.0.0 + */ + protected int $id = 0; + /** + * Name. + * + * @var string + * @since 1.0.0 + */ + private string $name = ''; + /** + * Description. + * + * @var string + * @since 1.0.0 + */ + private string $description = ''; + /** + * Description. + * + * @var string + * @since 1.0.0 + */ + private string $descriptionRaw = ''; private $unit = 1; @@ -58,11 +79,23 @@ class Risk private $createdAt = null; + /** + * Constructor. + * + * @since 1.0.0 + */ public function __construct() { $this->createdAt = new \DateTime('now'); } + /** + * Get id. + * + * @return int Model id + * + * @since 1.0.0 + */ public function getId() : int { return $this->id; @@ -118,16 +151,39 @@ class Risk return $this->histScore; } + /** + * Get name + * + * @return string + * + * @since 1.0.0 + */ public function getName() : string { return $this->name; } + /** + * Set name + * + * @param string $name Name + * + * @return void + * + * @since 1.0.0 + */ public function setName(string $name) : void { $this->name = $name; } + /** + * Get description + * + * @return string + * + * @since 1.0.0 + */ public function getDescription() : string { return $this->description; diff --git a/Models/RiskObject.php b/Models/RiskObject.php index 77f7abb..d1c7e5a 100644 --- a/Models/RiskObject.php +++ b/Models/RiskObject.php @@ -24,20 +24,39 @@ namespace Modules\RiskManagement\Models; */ class RiskObject { - private $id = 0; + /** + * ID. + * + * @var int + * @since 1.0.0 + */ + protected int $id = 0; private $title = ''; - - private $description = ''; - - private $descriptionRaw = ''; + /** + * Description. + * + * @var string + * @since 1.0.0 + */ + private string $description = ''; + /** + * Description. + * + * @var string + * @since 1.0.0 + */ + private string $descriptionRaw = ''; private $risk = null; - public function __construct() - { - } - + /** + * Get id. + * + * @return int Model id + * + * @since 1.0.0 + */ public function getId() : int { return $this->id; @@ -63,6 +82,13 @@ class RiskObject $this->title = $title; } + /** + * Get description + * + * @return string + * + * @since 1.0.0 + */ public function getDescription() : string { return $this->description; diff --git a/Models/Solution.php b/Models/Solution.php index dd2c05b..6374f95 100644 --- a/Models/Solution.php +++ b/Models/Solution.php @@ -24,13 +24,29 @@ namespace Modules\RiskManagement\Models; */ class Solution { - private $id = 0; + /** + * ID. + * + * @var int + * @since 1.0.0 + */ + protected int $id = 0; private $title = ''; - - private $description = ''; - - private $descriptionRaw = ''; + /** + * Description. + * + * @var string + * @since 1.0.0 + */ + private string $description = ''; + /** + * Description. + * + * @var string + * @since 1.0.0 + */ + private string $descriptionRaw = ''; private $probability = 0; @@ -38,10 +54,13 @@ class Solution private $risk = null; - public function __construct() - { - } - + /** + * Get id. + * + * @return int Model id + * + * @since 1.0.0 + */ public function getId() : int { return $this->id; @@ -87,6 +106,13 @@ class Solution $this->title = $title; } + /** + * Get description + * + * @return string + * + * @since 1.0.0 + */ public function getDescription() : string { return $this->description; diff --git a/Theme/Backend/Lang/Navigation.en.lang.php b/Theme/Backend/Lang/Navigation.en.lang.php index e2389d9..e70ecab 100644 --- a/Theme/Backend/Lang/Navigation.en.lang.php +++ b/Theme/Backend/Lang/Navigation.en.lang.php @@ -1,4 +1,4 @@ - [ 'Categories' => 'Categories', 'Causes' => 'Causes', diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index 6a1bbf1..3f42da5 100644 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -1,4 +1,4 @@ - [ 'Active' => 'Active', 'All' => 'All', diff --git a/Theme/Backend/category-list.tpl.php b/Theme/Backend/category-list.tpl.php index 5cba27d..32ddad8 100644 --- a/Theme/Backend/category-list.tpl.php +++ b/Theme/Backend/category-list.tpl.php @@ -1,4 +1,4 @@ -getData('categories'); echo $this->getData('nav')->render(); ?> diff --git a/Theme/Backend/category-single.tpl.php b/Theme/Backend/category-single.tpl.php index b47794d..c88f8d7 100644 --- a/Theme/Backend/category-single.tpl.php +++ b/Theme/Backend/category-single.tpl.php @@ -1,4 +1,4 @@ -getData('category'); echo $this->getData('nav')->render(); diff --git a/Theme/Backend/cause-create.tpl.php b/Theme/Backend/cause-create.tpl.php index 12aea38..66e94ee 100644 --- a/Theme/Backend/cause-create.tpl.php +++ b/Theme/Backend/cause-create.tpl.php @@ -1,4 +1,4 @@ -getData('nav')->render(); diff --git a/Theme/Backend/cause-list.tpl.php b/Theme/Backend/cause-list.tpl.php index 92ed11a..122b7cf 100644 --- a/Theme/Backend/cause-list.tpl.php +++ b/Theme/Backend/cause-list.tpl.php @@ -1,4 +1,4 @@ -getData('causes'); echo $this->getData('nav')->render(); ?> diff --git a/Theme/Backend/cause-single.tpl.php b/Theme/Backend/cause-single.tpl.php index 53ae6ab..cbe5690 100644 --- a/Theme/Backend/cause-single.tpl.php +++ b/Theme/Backend/cause-single.tpl.php @@ -1,4 +1,4 @@ -getData('cause'); echo $this->getData('nav')->render(); diff --git a/Theme/Backend/cockpit.tpl.php b/Theme/Backend/cockpit.tpl.php index 5bf732b..3aae95b 100644 --- a/Theme/Backend/cockpit.tpl.php +++ b/Theme/Backend/cockpit.tpl.php @@ -1,4 +1,4 @@ -getData('departments'); echo $this->getData('nav')->render(); ?> diff --git a/Theme/Backend/department-single.tpl.php b/Theme/Backend/department-single.tpl.php index 245272f..69cc7d3 100644 --- a/Theme/Backend/department-single.tpl.php +++ b/Theme/Backend/department-single.tpl.php @@ -1,4 +1,4 @@ -getData('department'); echo $this->getData('nav')->render(); ?> diff --git a/Theme/Backend/process-list.tpl.php b/Theme/Backend/process-list.tpl.php index 916fd24..21a6b72 100644 --- a/Theme/Backend/process-list.tpl.php +++ b/Theme/Backend/process-list.tpl.php @@ -1,4 +1,4 @@ -getData('processes'); echo $this->getData('nav')->render(); ?> diff --git a/Theme/Backend/process-single.tpl.php b/Theme/Backend/process-single.tpl.php index bf513bc..9256128 100644 --- a/Theme/Backend/process-single.tpl.php +++ b/Theme/Backend/process-single.tpl.php @@ -1,4 +1,4 @@ -getData('process'); echo $this->getData('nav')->render(); diff --git a/Theme/Backend/project-list.tpl.php b/Theme/Backend/project-list.tpl.php index 4c0e5a1..10eb3b9 100644 --- a/Theme/Backend/project-list.tpl.php +++ b/Theme/Backend/project-list.tpl.php @@ -1,4 +1,4 @@ -getData('projects'); echo $this->getData('nav')->render(); ?> diff --git a/Theme/Backend/project-single.tpl.php b/Theme/Backend/project-single.tpl.php index 4f9fb97..3f32863 100644 --- a/Theme/Backend/project-single.tpl.php +++ b/Theme/Backend/project-single.tpl.php @@ -1,4 +1,4 @@ -getData('project'); echo $this->getData('nav')->render(); diff --git a/Theme/Backend/risk-create.tpl.php b/Theme/Backend/risk-create.tpl.php index 7cd12ba..9459b26 100644 --- a/Theme/Backend/risk-create.tpl.php +++ b/Theme/Backend/risk-create.tpl.php @@ -1,4 +1,4 @@ -getData('nav')->render(); ?>
diff --git a/Theme/Backend/risk-list.tpl.php b/Theme/Backend/risk-list.tpl.php index 8b5c2b2..9f3b605 100644 --- a/Theme/Backend/risk-list.tpl.php +++ b/Theme/Backend/risk-list.tpl.php @@ -1,4 +1,4 @@ -getData('risks'); echo $this->getData('nav')->render(); ?> diff --git a/Theme/Backend/risk-single.tpl.php b/Theme/Backend/risk-single.tpl.php index 8f3595d..7bd1ca9 100644 --- a/Theme/Backend/risk-single.tpl.php +++ b/Theme/Backend/risk-single.tpl.php @@ -1,4 +1,4 @@ -getData('risk'); echo $this->getData('nav')->render(); ?> diff --git a/Theme/Backend/settings-dashboard.tpl.php b/Theme/Backend/settings-dashboard.tpl.php index 12aea38..66e94ee 100644 --- a/Theme/Backend/settings-dashboard.tpl.php +++ b/Theme/Backend/settings-dashboard.tpl.php @@ -1,4 +1,4 @@ -getData('nav')->render(); diff --git a/Theme/Backend/solution-create.tpl.php b/Theme/Backend/solution-create.tpl.php index 12aea38..66e94ee 100644 --- a/Theme/Backend/solution-create.tpl.php +++ b/Theme/Backend/solution-create.tpl.php @@ -1,4 +1,4 @@ -getData('nav')->render(); diff --git a/Theme/Backend/solution-list.tpl.php b/Theme/Backend/solution-list.tpl.php index c04efb1..af0fe16 100644 --- a/Theme/Backend/solution-list.tpl.php +++ b/Theme/Backend/solution-list.tpl.php @@ -1,4 +1,4 @@ -getData('solutions'); echo $this->getData('nav')->render(); ?> diff --git a/Theme/Backend/solution-single.tpl.php b/Theme/Backend/solution-single.tpl.php index 36b0a7d..c218536 100644 --- a/Theme/Backend/solution-single.tpl.php +++ b/Theme/Backend/solution-single.tpl.php @@ -1,4 +1,4 @@ -getData('solution'); echo $this->getData('nav')->render(); diff --git a/Theme/Backend/unit-list.tpl.php b/Theme/Backend/unit-list.tpl.php index 731d4b6..a55d88b 100644 --- a/Theme/Backend/unit-list.tpl.php +++ b/Theme/Backend/unit-list.tpl.php @@ -1,4 +1,4 @@ -getData('units'); echo $this->getData('nav')->render(); ?> diff --git a/Theme/Backend/unit-single.tpl.php b/Theme/Backend/unit-single.tpl.php index d9abec3..fdde1b4 100644 --- a/Theme/Backend/unit-single.tpl.php +++ b/Theme/Backend/unit-single.tpl.php @@ -1,4 +1,4 @@ -getData('unit'); echo $this->getData('nav')->render(); ?>