@@ -413,9 +413,6 @@ final class EnglishInflector implements InflectorInterface
413413 'tfarcria ' ,
414414 ];
415415
416- /**
417- * {@inheritdoc}
418- */
419416 public function singularize (string $ plural ): array
420417 {
421418 $ pluralRev = strrev ($ plural );
@@ -447,7 +444,7 @@ public function singularize(string $plural): array
447444 if ($ j === $ suffixLength ) {
448445 // Is there any character preceding the suffix in the plural string?
449446 if ($ j < $ pluralLength ) {
450- $ nextIsVowel = false !== strpos ('aeiou ' , $ lowerPluralRev [$ j ]);
447+ $ nextIsVowel = str_contains ('aeiou ' , $ lowerPluralRev [$ j ]);
451448
452449 if (!$ map [2 ] && $ nextIsVowel ) {
453450 // suffix may not succeed a vowel but next char is one
@@ -492,9 +489,6 @@ public function singularize(string $plural): array
492489 return [$ plural ];
493490 }
494491
495- /**
496- * {@inheritdoc}
497- */
498492 public function pluralize (string $ singular ): array
499493 {
500494 $ singularRev = strrev ($ singular );
@@ -527,7 +521,7 @@ public function pluralize(string $singular): array
527521 if ($ j === $ suffixLength ) {
528522 // Is there any character preceding the suffix in the plural string?
529523 if ($ j < $ singularLength ) {
530- $ nextIsVowel = false !== strpos ('aeiou ' , $ lowerSingularRev [$ j ]);
524+ $ nextIsVowel = str_contains ('aeiou ' , $ lowerSingularRev [$ j ]);
531525
532526 if (!$ map [2 ] && $ nextIsVowel ) {
533527 // suffix may not succeed a vowel but next char is one
0 commit comments