From 760c7a10b10a093f2227d980166e3b25c5e49b66 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 6 Oct 2019 17:50:12 +0200 Subject: [PATCH] phpcs fixes --- Models/Event.php | 59 +++++++++++++++++-- Theme/Backend/Lang/Navigation.en.lang.php | 4 +- Theme/Backend/Lang/api.en.lang.php | 4 +- Theme/Backend/Lang/en.lang.php | 4 +- Theme/Backend/eventmanagement-create.tpl.php | 4 +- Theme/Backend/eventmanagement-list.tpl.php | 4 +- Theme/Backend/eventmanagement-profile.tpl.php | 4 +- 7 files changed, 72 insertions(+), 11 deletions(-) diff --git a/Models/Event.php b/Models/Event.php index 9243012..21b311d 100644 --- a/Models/Event.php +++ b/Models/Event.php @@ -38,15 +38,25 @@ class Event */ private int $id = 0; - private $type = EventType::DEFAULT; + private int $type = EventType::DEFAULT; private $start = null; private $end = null; - - private $name = ''; - - private $description = ''; + /** + * Name. + * + * @var string + * @since 1.0.0 + */ + private string $name = ''; + /** + * Description. + * + * @var string + * @since 1.0.0 + */ + private string $description = ''; private $calendar = null; @@ -148,21 +158,53 @@ class Event return $this->calendar; } + /** + * Set description + * + * @param string $description Description + * + * @return void + * + * @since 1.0.0 + */ public function setDescription(string $description) : void { $this->description = $description; } + /** + * Get description + * + * @return string + * + * @since 1.0.0 + */ public function getDescription() : string { return $this->description; } + /** + * Set name + * + * @param string $name Name + * + * @return void + * + * @since 1.0.0 + */ public function setName(string $name) : void { $this->name = $name; } + /** + * Get name + * + * @return string + * + * @since 1.0.0 + */ public function getName() : string { return $this->name; @@ -203,6 +245,13 @@ class Event return \count($this->tasks); } + /** + * Get id. + * + * @return int Model id + * + * @since 1.0.0 + */ public function getId() : int { return $this->id; diff --git a/Theme/Backend/Lang/Navigation.en.lang.php b/Theme/Backend/Lang/Navigation.en.lang.php index 4b67962..f271fd8 100644 --- a/Theme/Backend/Lang/Navigation.en.lang.php +++ b/Theme/Backend/Lang/Navigation.en.lang.php @@ -1,4 +1,4 @@ - [ 'EventManagement' => 'Event Management', ]]; diff --git a/Theme/Backend/Lang/api.en.lang.php b/Theme/Backend/Lang/api.en.lang.php index b7f0272..fc34ca9 100644 --- a/Theme/Backend/Lang/api.en.lang.php +++ b/Theme/Backend/Lang/api.en.lang.php @@ -1,4 +1,4 @@ - [ 'Account' => 'Account', 'Actual' => 'Actual', diff --git a/Theme/Backend/eventmanagement-create.tpl.php b/Theme/Backend/eventmanagement-create.tpl.php index a60be4f..ffcb3f8 100644 --- a/Theme/Backend/eventmanagement-create.tpl.php +++ b/Theme/Backend/eventmanagement-create.tpl.php @@ -1,4 +1,4 @@ -getData('nav')->render(); ?> diff --git a/Theme/Backend/eventmanagement-list.tpl.php b/Theme/Backend/eventmanagement-list.tpl.php index 1c9736c..ddb1cfe 100644 --- a/Theme/Backend/eventmanagement-list.tpl.php +++ b/Theme/Backend/eventmanagement-list.tpl.php @@ -1,4 +1,4 @@ -app, $this->request, $this->response); $footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig'); diff --git a/Theme/Backend/eventmanagement-profile.tpl.php b/Theme/Backend/eventmanagement-profile.tpl.php index 96677ec..5f84b15 100644 --- a/Theme/Backend/eventmanagement-profile.tpl.php +++ b/Theme/Backend/eventmanagement-profile.tpl.php @@ -1,4 +1,4 @@ -getData('event'); $tasks = $event->getTasks();