@@ -116,7 +116,7 @@ private function apply_inflections(string $word, array $rules): string
116116 return $ rc ;
117117 }
118118
119- if (preg_match ('/\b[[:word:]]+\Z/u ' , downcase ($ rc ), $ matches )) {
119+ if (preg_match ('/\b[[:word:]]+\Z/u ' , StaticInflector:: downcase ($ rc ), $ matches )) {
120120 if (isset ($ this ->inflections ->uncountables [$ matches [0 ]])) {
121121 return $ rc ;
122122 }
@@ -203,7 +203,7 @@ public function camelize(string $term, bool $downcase_first_letter = self::UPCAS
203203 . trim ($ this ->inflections ->acronym_regex , '/ ' )
204204 . '(?=\b|[[:upper:]_])|\w)/u ' ,
205205 function (array $ matches ): string {
206- return downcase ($ matches [0 ]);
206+ return StaticInflector:: downcase ($ matches [0 ]);
207207 },
208208 $ string ,
209209 1
@@ -214,7 +214,7 @@ function (array $matches): string {
214214 function (array $ matches ) use ($ acronyms ): string {
215215 $ m = $ matches [0 ];
216216
217- return !empty ($ acronyms [$ m ]) ? $ acronyms [$ m ] : capitalize ($ m , true );
217+ return !empty ($ acronyms [$ m ]) ? $ acronyms [$ m ] : StaticInflector:: capitalize ($ m , true );
218218 },
219219 $ string ,
220220 1
@@ -228,7 +228,7 @@ function (array $matches) use ($acronyms): string {
228228 function (array $ matches ) use ($ acronyms ): string {
229229 [ , $ m1 , $ m2 ] = $ matches ;
230230
231- return $ m1 . ($ acronyms [$ m2 ] ?? capitalize ($ m2 , true ));
231+ return $ m1 . ($ acronyms [$ m2 ] ?? StaticInflector:: capitalize ($ m2 , true ));
232232 },
233233 $ string
234234 );
@@ -266,7 +266,7 @@ public function underscore(string $camel_cased_word): string
266266 function (array $ matches ): string {
267267 [ , $ m1 , $ m2 ] = $ matches ;
268268
269- return $ m1 . ($ m1 ? '_ ' : '' ) . downcase ($ m2 );
269+ return $ m1 . ($ m1 ? '_ ' : '' ) . StaticInflector:: downcase ($ m2 );
270270 },
271271 $ word
272272 );
@@ -279,7 +279,7 @@ function (array $matches): string {
279279 $ word = preg_replace ('/\-+|\s+/ ' , '_ ' , $ word );
280280
281281 // @phpstan-ignore-next-line
282- return downcase ($ word );
282+ return StaticInflector:: downcase ($ word );
283283 }
284284
285285 /**
@@ -315,7 +315,7 @@ public function humanize(string $lower_case_and_underscored_word): string
315315 function (array $ matches ) use ($ acronyms ): string {
316316 [ $ m ] = $ matches ;
317317
318- return !empty ($ acronyms [$ m ]) ? $ acronyms [$ m ] : downcase ($ m );
318+ return !empty ($ acronyms [$ m ]) ? $ acronyms [$ m ] : StaticInflector:: downcase ($ m );
319319 },
320320 $ result
321321 );
@@ -324,7 +324,7 @@ function (array $matches) use ($acronyms): string {
324324
325325 // @phpstan-ignore-next-line
326326 return preg_replace_callback ('/^[[:lower:]]/u ' , function (array $ matches ): string {
327- return upcase ($ matches [0 ]);
327+ return StaticInflector:: upcase ($ matches [0 ]);
328328 }, $ result );
329329 }
330330
@@ -347,7 +347,7 @@ public function titleize(string $str): string
347347
348348 // @phpstan-ignore-next-line
349349 return preg_replace_callback ('/\b(?<![ \'’`])[[:lower:]]/u ' , function (array $ matches ): string {
350- return upcase ($ matches [0 ]);
350+ return StaticInflector:: upcase ($ matches [0 ]);
351351 }, $ str );
352352 }
353353
@@ -438,7 +438,7 @@ public function is_uncountable(string $word): bool
438438 $ rc = $ word ;
439439
440440 return $ rc
441- && preg_match ('/\b[[:word:]]+\Z/u ' , downcase ($ rc ), $ matches )
441+ && preg_match ('/\b[[:word:]]+\Z/u ' , StaticInflector:: downcase ($ rc ), $ matches )
442442 && isset ($ this ->inflections ->uncountables [$ matches [0 ]]);
443443 }
444444}
0 commit comments