From 2c7b8ff9a58327cfb44d19c63f96fc36f5643570 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 23 Jan 2021 12:26:34 +0100 Subject: [PATCH] fix install --- Admin/Installer.php | 2 +- Models/ItemAttributeTypeL11n.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Admin/Installer.php b/Admin/Installer.php index 03d9bfe..448301b 100644 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -59,7 +59,7 @@ final class Installer extends InstallerAbstract { $itemAttrType = []; - $itemAttrType['color'] = new ItemAttributeType('color'); + $itemAttrType['color'] = new ItemAttributeType('color'); // @todo: I think 'color' in this case is a ItemAttributeTypeL11n, this is wrong?! ItemAttributeTypeMapper::create($itemAttrType['color']); ItemAttributeTypeL11nMapper::create(new ItemAttributeTypeL11n($itemAttrType['color']->getId(), 'Color', ISO639x1Enum::_EN)); ItemAttributeTypeL11nMapper::create(new ItemAttributeTypeL11n($itemAttrType['color']->getId(), 'Farbe', ISO639x1Enum::_DE)); diff --git a/Models/ItemAttributeTypeL11n.php b/Models/ItemAttributeTypeL11n.php index 6fe69ba..b716474 100644 --- a/Models/ItemAttributeTypeL11n.php +++ b/Models/ItemAttributeTypeL11n.php @@ -41,7 +41,7 @@ class ItemAttributeTypeL11n implements \JsonSerializable, ArrayableInterface * @var int|ItemL11nType * @since 1.0.0 */ - protected $type = 0; + protected int|ItemL11nType $type = 0; /** * Language. @@ -68,7 +68,7 @@ class ItemAttributeTypeL11n implements \JsonSerializable, ArrayableInterface * * @since 1.0.0 */ - public function __construct($type = 0, string $title = '', string $language = ISO639x1Enum::_EN) + public function __construct(int|ItemL11nType $type = 0, string $title = '', string $language = ISO639x1Enum::_EN) { $this->type = $type; $this->title = $title;