Removed typehint making phpstan throw false positive

This commit is contained in:
Alejandro Celaya 2019-11-01 10:04:25 +01:00
parent 5361f33cc1
commit ad906000c7

View File

@ -22,7 +22,7 @@ trait TagManagerTrait
*/
private function tagNamesToEntities(EntityManagerInterface $em, array $tags): Collections\Collection
{
$entities = map($tags, function (string $tagName) use ($em): Tag {
$entities = map($tags, function (string $tagName) use ($em) {
$tagName = $this->normalizeTagName($tagName);
$tag = $em->getRepository(Tag::class)->findOneBy(['name' => $tagName]) ?? new Tag($tagName);
$em->persist($tag);