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;