fix install

This commit is contained in:
Dennis Eichhorn 2021-01-23 12:26:34 +01:00
parent 7954306cc3
commit 2c7b8ff9a5
2 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ final class Installer extends InstallerAbstract
{ {
$itemAttrType = []; $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']); ItemAttributeTypeMapper::create($itemAttrType['color']);
ItemAttributeTypeL11nMapper::create(new ItemAttributeTypeL11n($itemAttrType['color']->getId(), 'Color', ISO639x1Enum::_EN)); ItemAttributeTypeL11nMapper::create(new ItemAttributeTypeL11n($itemAttrType['color']->getId(), 'Color', ISO639x1Enum::_EN));
ItemAttributeTypeL11nMapper::create(new ItemAttributeTypeL11n($itemAttrType['color']->getId(), 'Farbe', ISO639x1Enum::_DE)); ItemAttributeTypeL11nMapper::create(new ItemAttributeTypeL11n($itemAttrType['color']->getId(), 'Farbe', ISO639x1Enum::_DE));

View File

@ -41,7 +41,7 @@ class ItemAttributeTypeL11n implements \JsonSerializable, ArrayableInterface
* @var int|ItemL11nType * @var int|ItemL11nType
* @since 1.0.0 * @since 1.0.0
*/ */
protected $type = 0; protected int|ItemL11nType $type = 0;
/** /**
* Language. * Language.
@ -68,7 +68,7 @@ class ItemAttributeTypeL11n implements \JsonSerializable, ArrayableInterface
* *
* @since 1.0.0 * @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->type = $type;
$this->title = $title; $this->title = $title;