@@ -138,7 +138,7 @@ final class EnglishInflector implements InflectorInterface
138
138
*
139
139
* @see http://english-zone.com/spelling/plurals.html
140
140
*/
141
- private static $ singularMap = [
141
+ private const SINGULAR_MAP = [
142
142
// First entry: singular suffix, reversed
143
143
// Second entry: length of singular suffix
144
144
// Third entry: Whether the suffix may succeed a vocal
@@ -304,7 +304,7 @@ final class EnglishInflector implements InflectorInterface
304
304
/**
305
305
* A list of words which should not be inflected, reversed.
306
306
*/
307
- private static $ uninflected = [
307
+ private const UNINFLECTED = [
308
308
'' ,
309
309
'atad ' ,
310
310
'reed ' ,
@@ -327,7 +327,7 @@ public function singularize(string $plural): array
327
327
$ pluralLength = \strlen ($ lowerPluralRev );
328
328
329
329
// Check if the word is one which is not inflected, return early if so
330
- if (\in_array ($ lowerPluralRev , self ::$ uninflected , true )) {
330
+ if (\in_array ($ lowerPluralRev , self ::UNINFLECTED , true )) {
331
331
return [$ plural ];
332
332
}
333
333
@@ -406,15 +406,15 @@ public function pluralize(string $singular): array
406
406
$ singularLength = \strlen ($ lowerSingularRev );
407
407
408
408
// Check if the word is one which is not inflected, return early if so
409
- if (\in_array ($ lowerSingularRev , self ::$ uninflected , true )) {
409
+ if (\in_array ($ lowerSingularRev , self ::UNINFLECTED , true )) {
410
410
return [$ singular ];
411
411
}
412
412
413
413
// The outer loop iterates over the entries of the singular table
414
414
// The inner loop $j iterates over the characters of the singular suffix
415
415
// in the singular table to compare them with the characters of the actual
416
416
// given singular suffix
417
- foreach (self ::$ singularMap as $ map ) {
417
+ foreach (self ::SINGULAR_MAP as $ map ) {
418
418
$ suffix = $ map [0 ];
419
419
$ suffixLength = $ map [1 ];
420
420
$ j = 0 ;
0 commit comments