@@ -116,7 +116,7 @@ private function apply_inflections(string $word, array $rules): string
116
116
return $ rc ;
117
117
}
118
118
119
- if (preg_match ('/\b[[:word:]]+\Z/u ' , downcase ($ rc ), $ matches )) {
119
+ if (preg_match ('/\b[[:word:]]+\Z/u ' , StaticInflector:: downcase ($ rc ), $ matches )) {
120
120
if (isset ($ this ->inflections ->uncountables [$ matches [0 ]])) {
121
121
return $ rc ;
122
122
}
@@ -203,7 +203,7 @@ public function camelize(string $term, bool $downcase_first_letter = self::UPCAS
203
203
. trim ($ this ->inflections ->acronym_regex , '/ ' )
204
204
. '(?=\b|[[:upper:]_])|\w)/u ' ,
205
205
function (array $ matches ): string {
206
- return downcase ($ matches [0 ]);
206
+ return StaticInflector:: downcase ($ matches [0 ]);
207
207
},
208
208
$ string ,
209
209
1
@@ -214,7 +214,7 @@ function (array $matches): string {
214
214
function (array $ matches ) use ($ acronyms ): string {
215
215
$ m = $ matches [0 ];
216
216
217
- return !empty ($ acronyms [$ m ]) ? $ acronyms [$ m ] : capitalize ($ m , true );
217
+ return !empty ($ acronyms [$ m ]) ? $ acronyms [$ m ] : StaticInflector:: capitalize ($ m , true );
218
218
},
219
219
$ string ,
220
220
1
@@ -228,7 +228,7 @@ function (array $matches) use ($acronyms): string {
228
228
function (array $ matches ) use ($ acronyms ): string {
229
229
[ , $ m1 , $ m2 ] = $ matches ;
230
230
231
- return $ m1 . ($ acronyms [$ m2 ] ?? capitalize ($ m2 , true ));
231
+ return $ m1 . ($ acronyms [$ m2 ] ?? StaticInflector:: capitalize ($ m2 , true ));
232
232
},
233
233
$ string
234
234
);
@@ -266,7 +266,7 @@ public function underscore(string $camel_cased_word): string
266
266
function (array $ matches ): string {
267
267
[ , $ m1 , $ m2 ] = $ matches ;
268
268
269
- return $ m1 . ($ m1 ? '_ ' : '' ) . downcase ($ m2 );
269
+ return $ m1 . ($ m1 ? '_ ' : '' ) . StaticInflector:: downcase ($ m2 );
270
270
},
271
271
$ word
272
272
);
@@ -279,7 +279,7 @@ function (array $matches): string {
279
279
$ word = preg_replace ('/\-+|\s+/ ' , '_ ' , $ word );
280
280
281
281
// @phpstan-ignore-next-line
282
- return downcase ($ word );
282
+ return StaticInflector:: downcase ($ word );
283
283
}
284
284
285
285
/**
@@ -315,7 +315,7 @@ public function humanize(string $lower_case_and_underscored_word): string
315
315
function (array $ matches ) use ($ acronyms ): string {
316
316
[ $ m ] = $ matches ;
317
317
318
- return !empty ($ acronyms [$ m ]) ? $ acronyms [$ m ] : downcase ($ m );
318
+ return !empty ($ acronyms [$ m ]) ? $ acronyms [$ m ] : StaticInflector:: downcase ($ m );
319
319
},
320
320
$ result
321
321
);
@@ -324,7 +324,7 @@ function (array $matches) use ($acronyms): string {
324
324
325
325
// @phpstan-ignore-next-line
326
326
return preg_replace_callback ('/^[[:lower:]]/u ' , function (array $ matches ): string {
327
- return upcase ($ matches [0 ]);
327
+ return StaticInflector:: upcase ($ matches [0 ]);
328
328
}, $ result );
329
329
}
330
330
@@ -347,7 +347,7 @@ public function titleize(string $str): string
347
347
348
348
// @phpstan-ignore-next-line
349
349
return preg_replace_callback ('/\b(?<![ \'’`])[[:lower:]]/u ' , function (array $ matches ): string {
350
- return upcase ($ matches [0 ]);
350
+ return StaticInflector:: upcase ($ matches [0 ]);
351
351
}, $ str );
352
352
}
353
353
@@ -438,7 +438,7 @@ public function is_uncountable(string $word): bool
438
438
$ rc = $ word ;
439
439
440
440
return $ rc
441
- && preg_match ('/\b[[:word:]]+\Z/u ' , downcase ($ rc ), $ matches )
441
+ && preg_match ('/\b[[:word:]]+\Z/u ' , StaticInflector:: downcase ($ rc ), $ matches )
442
442
&& isset ($ this ->inflections ->uncountables [$ matches [0 ]]);
443
443
}
444
444
}
0 commit comments