diff --git a/Models/WikiCategory.php b/Models/WikiCategory.php index 0aa4ded..c7741c1 100755 --- a/Models/WikiCategory.php +++ b/Models/WikiCategory.php @@ -50,7 +50,7 @@ class WikiCategory implements \JsonSerializable * @var string|WikiCategoryL11n * @since 1.0.0 */ - private $name = ''; + private string | WikiCategoryL11n $name = ''; /** * Parent category. @@ -117,7 +117,7 @@ class WikiCategory implements \JsonSerializable { if ($name instanceof WikiCategoryL11n) { $this->name = $name; - } elseif (isset($this->name) && $this->name instanceof WikiCategoryL11n) { + } elseif ($this->name instanceof WikiCategoryL11n) { $this->name->name = $name; } else { $this->name = new WikiCategoryL11n(); diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index d46fd31..b5d36a8 100755 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -257,6 +257,25 @@ $CONFIG = [ 'root' => '/', 'https' => false, ], + 'app' => [ + 'path' => __DIR__, + 'default' => [ + 'app' => 'Backend', + 'id' => 'backend', + 'lang' => 'en', + 'theme' => 'Backend', + 'org' => 1, + ], + 'domains' => [ + '127.0.0.1' => [ + 'app' => 'Backend', + 'id' => 'backend', + 'lang' => 'en', + 'theme' => 'Backend', + 'org' => 1, + ], + ], + ], 'socket' => [ 'master' => [ 'host' => '127.0.0.1',