class TagsAssigner
{
-
/**
- * @var TagRepository $tagRepository
+ * @var TagRepository
*/
protected $tagRepository;
{
$tagsEntities = [];
- if (!is_array($tags)) {
+ if (!\is_array($tags)) {
$tags = explode(',', $tags);
}
}
foreach ($tags as $label) {
- $label = trim($label);
+ $label = trim(mb_convert_case($label, MB_CASE_LOWER));
// avoid empty tag
- if (0 === strlen($label)) {
+ if (0 === \strlen($label)) {
continue;
}