@@ -113,7 +113,7 @@ private function getValidTypes(string $content): string
113113            preg_match ('{^ ' .SniffHelper::REGEX_TYPES .'$}ix ' , $ content$ matches
114114
115115            if  (isset ($ matches'array ' ]) && ''  !== $ matches'array ' ]) {
116-                 $ validType$ this getValidTypes (substr ($ matches'array ' ], 0 , -2 )).'[] ' ;
116+                 $ validType$ this getValidTypes (mb_substr ($ matches'array ' ], 0 , -2 )).'[] ' ;
117117            } elseif  (isset ($ matches'multiple ' ]) && ''  !== $ matches'multiple ' ]) {
118118                $ validType'( ' .$ this getValidTypes ($ matches'mutipleContent ' ]).') ' ;
119119            } elseif  (isset ($ matches'generic ' ]) && ''  !== $ matches'generic ' ]) {
@@ -126,8 +126,8 @@ private function getValidTypes(string $content): string
126126
127127            $ types$ validType
128128
129-             $ separatorssubstr ($ contentstrlen ($ matches'type ' ]), 1 );
130-             $ contentsubstr ($ contentstrlen ($ matches'type ' ]) + 1 );
129+             $ separatorsmb_substr ($ contentmb_strlen ($ matches'type ' ]), 1 );
130+             $ contentmb_substr ($ contentmb_strlen ($ matches'type ' ]) + 1 );
131131        }
132132
133133        // Remove last separator since it's an empty string 
@@ -185,7 +185,7 @@ private function getValidGenericType(string $genericName, string $genericContent
185185            preg_match ('{^ ' .SniffHelper::REGEX_TYPES .',?}ix ' , $ genericContent$ matches
186186
187187            $ validType$ this getValidTypes ($ matches'types ' ]).',  ' ;
188-             $ genericContentsubstr ($ genericContentstrlen ($ matches'types ' ]) + 1 );
188+             $ genericContentmb_substr ($ genericContentmb_strlen ($ matches'types ' ]) + 1 );
189189        }
190190
191191        return  preg_replace ('/,\s$/ ' , '> ' , $ validType
@@ -213,7 +213,7 @@ private function getValidObjectType(string $objectContent): string
213213            preg_match ('{^ ' .SniffHelper::REGEX_TYPES .',?}ix ' , $ objectContent$ matches
214214
215215            $ validType$ this getValidTypes ($ matches'types ' ]).',  ' ;
216-             $ objectContentsubstr ($ objectContentstrlen ($ matches'types ' ]) + 1 );
216+             $ objectContentmb_substr ($ objectContentmb_strlen ($ matches'types ' ]) + 1 );
217217        }
218218
219219        return  preg_replace ('/,\s$/ ' , '} ' , $ validType
@@ -226,7 +226,7 @@ private function getValidObjectType(string $objectContent): string
226226     */ 
227227    private  function  getValidType (string  $ typeNamestring 
228228    {
229-         $ lowerTypestrtolower ($ typeName
229+         $ lowerTypemb_strtolower ($ typeName
230230        if  (isset (self ::TYPES [$ lowerType
231231            return  self ::TYPES [$ lowerType$ lowerType$ typeName
232232        }
0 commit comments