autofixes

This commit is contained in:
Dennis Eichhorn 2020-11-24 18:44:22 +01:00
parent 4af355e54b
commit e3b541fe38
2 changed files with 2 additions and 2 deletions

View File

@ -186,7 +186,7 @@ class Tag implements \JsonSerializable, ArrayableInterface
} elseif ($this->title instanceof TagL11n && \is_string($title)) {
$this->title->title = $title;
} elseif (\is_string($title)) {
$this->title = new TagL11n();
$this->title = new TagL11n();
$this->title->title = $title;
$this->title->setLanguage($lang);
}

View File

@ -40,7 +40,7 @@ class TagL11nMapperTest extends \PHPUnit\Framework\TestCase
self::assertGreaterThan(0, $tag->getId());
self::assertEquals($id, $tag->getId());
$l11n = new TagL11n();
$l11n = new TagL11n();
$l11n->title = 'TestTitle';
$l11n->setLanguage(ISO639x1Enum::_EN);
$l11n->setTag($id);