Skip to content

Commit 72a0f85

Browse files
Simplified code
1 parent 3e891f5 commit 72a0f85

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/AppBundle/Form/DataTransformer/TagArrayToStringTransformer.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ public function reverseTransform($string)
5454
return [];
5555
}
5656

57-
$names = array_filter(array_unique(array_map('trim', explode(',', $string))), function ($name) {
58-
return !empty($name);
59-
});
57+
$names = array_filter(array_unique(array_map('trim', explode(',', $string))));
6058

6159
// Get the current tags and find the new ones that should be created.
6260
$tags = $this->manager->getRepository(Tag::class)->findBy([

0 commit comments

Comments
 (0)