@@ -137,7 +137,7 @@ public function ascii(array $rules = []): self
137137 }
138138 } elseif (!\function_exists ('iconv ' )) {
139139 $ s = preg_replace ('/[^\x00-\x7F]/u ' , '? ' , $ s );
140- } elseif (ICONV_IMPL === 'glibc ' ) {
140+ } elseif (\ ICONV_IMPL === 'glibc ' ) {
141141 $ s = iconv ('UTF-8 ' , 'ASCII//TRANSLIT ' , $ s );
142142 } else {
143143 $ s = @preg_replace_callback ('/[^\x00-\x7F]/u ' , static function ($ c ) {
@@ -159,7 +159,7 @@ public function camel(): parent
159159 {
160160 $ str = clone $ this ;
161161 $ str ->string = str_replace (' ' , '' , preg_replace_callback ('/\b./u ' , static function ($ m ) use (&$ i ) {
162- return 1 === ++$ i ? ('İ ' === $ m [0 ] ? 'i̇ ' : mb_strtolower ($ m [0 ], 'UTF-8 ' )) : mb_convert_case ($ m [0 ], MB_CASE_TITLE , 'UTF-8 ' );
162+ return 1 === ++$ i ? ('İ ' === $ m [0 ] ? 'i̇ ' : mb_strtolower ($ m [0 ], 'UTF-8 ' )) : mb_convert_case ($ m [0 ], \ MB_CASE_TITLE , 'UTF-8 ' );
163163 }, preg_replace ('/[^\pL0-9]++/u ' , ' ' , $ this ->string )));
164164
165165 return $ str ;
@@ -178,7 +178,7 @@ public function codePointsAt(int $offset): array
178178
179179 $ codePoints = [];
180180
181- foreach (preg_split ('//u ' , $ str ->string , -1 , PREG_SPLIT_NO_EMPTY ) as $ c ) {
181+ foreach (preg_split ('//u ' , $ str ->string , -1 , \ PREG_SPLIT_NO_EMPTY ) as $ c ) {
182182 $ codePoints [] = mb_ord ($ c , 'UTF-8 ' );
183183 }
184184
@@ -223,7 +223,7 @@ public function lower(): parent
223223
224224 public function match (string $ regexp , int $ flags = 0 , int $ offset = 0 ): array
225225 {
226- $ match = ((PREG_PATTERN_ORDER | PREG_SET_ORDER ) & $ flags ) ? 'preg_match_all ' : 'preg_match ' ;
226+ $ match = ((\ PREG_PATTERN_ORDER | \ PREG_SET_ORDER ) & $ flags ) ? 'preg_match_all ' : 'preg_match ' ;
227227
228228 if ($ this ->ignoreCase ) {
229229 $ regexp .= 'i ' ;
@@ -232,7 +232,7 @@ public function match(string $regexp, int $flags = 0, int $offset = 0): array
232232 set_error_handler (static function ($ t , $ m ) { throw new InvalidArgumentException ($ m ); });
233233
234234 try {
235- if (false === $ match ($ regexp .'u ' , $ this ->string , $ matches , $ flags | PREG_UNMATCHED_AS_NULL , $ offset )) {
235+ if (false === $ match ($ regexp .'u ' , $ this ->string , $ matches , $ flags | \ PREG_UNMATCHED_AS_NULL , $ offset )) {
236236 $ lastError = preg_last_error ();
237237
238238 foreach (get_defined_constants (true )['pcre ' ] as $ k => $ v ) {
@@ -274,7 +274,7 @@ public function padBoth(int $length, string $padStr = ' '): parent
274274 $ pad = clone $ this ;
275275 $ pad ->string = $ padStr ;
276276
277- return $ this ->pad ($ length , $ pad , STR_PAD_BOTH );
277+ return $ this ->pad ($ length , $ pad , \ STR_PAD_BOTH );
278278 }
279279
280280 public function padEnd (int $ length , string $ padStr = ' ' ): parent
@@ -286,7 +286,7 @@ public function padEnd(int $length, string $padStr = ' '): parent
286286 $ pad = clone $ this ;
287287 $ pad ->string = $ padStr ;
288288
289- return $ this ->pad ($ length , $ pad , STR_PAD_RIGHT );
289+ return $ this ->pad ($ length , $ pad , \ STR_PAD_RIGHT );
290290 }
291291
292292 public function padStart (int $ length , string $ padStr = ' ' ): parent
@@ -298,7 +298,7 @@ public function padStart(int $length, string $padStr = ' '): parent
298298 $ pad = clone $ this ;
299299 $ pad ->string = $ padStr ;
300300
301- return $ this ->pad ($ length , $ pad , STR_PAD_LEFT );
301+ return $ this ->pad ($ length , $ pad , \ STR_PAD_LEFT );
302302 }
303303
304304 public function replaceMatches (string $ fromRegexp , $ to ): parent
@@ -355,7 +355,7 @@ public function replaceMatches(string $fromRegexp, $to): parent
355355 public function reverse (): parent
356356 {
357357 $ str = clone $ this ;
358- $ str ->string = implode ('' , array_reverse (preg_split ('/(\X)/u ' , $ str ->string , -1 , PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY )));
358+ $ str ->string = implode ('' , array_reverse (preg_split ('/(\X)/u ' , $ str ->string , -1 , \ PREG_SPLIT_DELIM_CAPTURE | \ PREG_SPLIT_NO_EMPTY )));
359359
360360 return $ str ;
361361 }
@@ -375,7 +375,7 @@ public function title(bool $allWords = false): parent
375375 $ limit = $ allWords ? -1 : 1 ;
376376
377377 $ str ->string = preg_replace_callback ('/\b./u ' , static function (array $ m ): string {
378- return mb_convert_case ($ m [0 ], MB_CASE_TITLE , 'UTF-8 ' );
378+ return mb_convert_case ($ m [0 ], \ MB_CASE_TITLE , 'UTF-8 ' );
379379 }, $ str ->string , $ limit );
380380
381381 return $ str ;
@@ -477,13 +477,13 @@ private function pad(int $len, self $pad, int $type): parent
477477 $ len = $ freeLen % $ padLen ;
478478
479479 switch ($ type ) {
480- case STR_PAD_RIGHT :
480+ case \ STR_PAD_RIGHT :
481481 return $ this ->append (str_repeat ($ pad ->string , $ freeLen / $ padLen ).($ len ? $ pad ->slice (0 , $ len ) : '' ));
482482
483- case STR_PAD_LEFT :
483+ case \ STR_PAD_LEFT :
484484 return $ this ->prepend (str_repeat ($ pad ->string , $ freeLen / $ padLen ).($ len ? $ pad ->slice (0 , $ len ) : '' ));
485485
486- case STR_PAD_BOTH :
486+ case \ STR_PAD_BOTH :
487487 $ freeLen /= 2 ;
488488
489489 $ rightLen = ceil ($ freeLen );
@@ -507,7 +507,7 @@ private function wcswidth(string $string): int
507507 {
508508 $ width = 0 ;
509509
510- foreach (preg_split ('//u ' , $ string , -1 , PREG_SPLIT_NO_EMPTY ) as $ c ) {
510+ foreach (preg_split ('//u ' , $ string , -1 , \ PREG_SPLIT_NO_EMPTY ) as $ c ) {
511511 $ codePoint = mb_ord ($ c , 'UTF-8 ' );
512512
513513 if (0 === $ codePoint // NULL
0 commit comments