From b37a830bafd2e2ebdb076e2550d1a7039d2986f7 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 4 Jul 2021 18:27:21 +0200 Subject: [PATCH] formatting fixes, bug fixes and support impl. --- Controller/Controller.php | 2 +- Models/NullWikiApp.php | 2 +- Models/NullWikiCategory.php | 2 +- Models/NullWikiDoc.php | 2 +- Models/WikiCategory.php | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Controller/Controller.php b/Controller/Controller.php index 9ea63bc..5151483 100755 --- a/Controller/Controller.php +++ b/Controller/Controller.php @@ -17,7 +17,7 @@ namespace Modules\Knowledgebase\Controller; use phpOMS\Module\ModuleAbstract; /** - * Task class. + * Knowledgebase controller class. * * @package Modules\Knowledgebase * @license OMS License 1.0 diff --git a/Models/NullWikiApp.php b/Models/NullWikiApp.php index d5177fe..415805e 100755 --- a/Models/NullWikiApp.php +++ b/Models/NullWikiApp.php @@ -15,7 +15,7 @@ declare(strict_types=1); namespace Modules\Knowledgebase\Models; /** - * Task class. + * Null model class. * * @package Modules\Knowledgebase\Models * @license OMS License 1.0 diff --git a/Models/NullWikiCategory.php b/Models/NullWikiCategory.php index 8abbf27..999037c 100755 --- a/Models/NullWikiCategory.php +++ b/Models/NullWikiCategory.php @@ -15,7 +15,7 @@ declare(strict_types=1); namespace Modules\Knowledgebase\Models; /** - * Task class. + * Null model class. * * @package Modules\Knowledgebase\Models * @license OMS License 1.0 diff --git a/Models/NullWikiDoc.php b/Models/NullWikiDoc.php index afcb4c0..a7fb77e 100755 --- a/Models/NullWikiDoc.php +++ b/Models/NullWikiDoc.php @@ -15,7 +15,7 @@ declare(strict_types=1); namespace Modules\Knowledgebase\Models; /** - * Task class. + * Null model class. * * @package Modules\Knowledgebase\Models * @license OMS License 1.0 diff --git a/Models/WikiCategory.php b/Models/WikiCategory.php index 3b4804a..7a2a71e 100755 --- a/Models/WikiCategory.php +++ b/Models/WikiCategory.php @@ -112,13 +112,13 @@ class WikiCategory implements \JsonSerializable * * @since 1.0.0 */ - public function setL11n($name, string $lang = ISO639x1Enum::_EN) : void + public function setL11n(string|WikiCategoryL11n $name, string $lang = ISO639x1Enum::_EN) : void { if ($name instanceof WikiCategoryL11n) { $this->name = $name; - } elseif ($this->name instanceof WikiCategoryL11n && \is_string($name)) { + } elseif (isset($this->name) && $this->name instanceof WikiCategoryL11n) { $this->name->name = $name; - } elseif (\is_string($name)) { + } else { $this->name = new WikiCategoryL11n(); $this->name->name = $name; $this->name->setLanguage($lang);