]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Helper/TagsAssigner.php
php-cs-fixer
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Helper / TagsAssigner.php
index ae712d772a188f6c47f66886784be9959a1e9470..e6b4989f8d64ba638b30e6bd7554bb96d8aa799e 100644 (file)
@@ -8,9 +8,8 @@ use Wallabag\CoreBundle\Repository\TagRepository;
 
 class TagsAssigner
 {
-
     /**
-     * @var TagRepository $tagRepository
+     * @var TagRepository
      */
     protected $tagRepository;
 
@@ -33,7 +32,7 @@ class TagsAssigner
     {
         $tagsEntities = [];
 
-        if (!is_array($tags)) {
+        if (!\is_array($tags)) {
             $tags = explode(',', $tags);
         }
 
@@ -46,10 +45,10 @@ class TagsAssigner
         }
 
         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;
             }