Browse Source

MbStrFunctionsFixer - more details about risky

SpacePossum 3 years ago
parent
commit
25f2809fb4
2 changed files with 3 additions and 2 deletions
  1. 2 1
      doc/rules/alias/mb_str_functions.rst
  2. 1 1
      src/Fixer/Alias/MbStrFunctionsFixer.php

+ 2 - 1
doc/rules/alias/mb_str_functions.rst

@@ -6,7 +6,8 @@ Replace non multibyte-safe functions with corresponding mb function.
 
 .. warning:: Using this rule is risky.
 
-   Risky when any of the functions are overridden.
+   Risky when any of the functions are overridden, or when relying on the string
+   byte size rather than its length in characters.
 
 Examples
 --------

+ 1 - 1
src/Fixer/Alias/MbStrFunctionsFixer.php

@@ -89,7 +89,7 @@ $a = substr_count($a, $b);
                 ),
             ],
             null,
-            'Risky when any of the functions are overridden.'
+            'Risky when any of the functions are overridden, or when relying on the string byte size rather than its length in characters.'
         );
     }