@@ -413,9 +413,6 @@ final class EnglishInflector implements InflectorInterface
413
413
'tfarcria ' ,
414
414
];
415
415
416
- /**
417
- * {@inheritdoc}
418
- */
419
416
public function singularize (string $ plural ): array
420
417
{
421
418
$ pluralRev = strrev ($ plural );
@@ -447,7 +444,7 @@ public function singularize(string $plural): array
447
444
if ($ j === $ suffixLength ) {
448
445
// Is there any character preceding the suffix in the plural string?
449
446
if ($ j < $ pluralLength ) {
450
- $ nextIsVowel = false !== strpos ('aeiou ' , $ lowerPluralRev [$ j ]);
447
+ $ nextIsVowel = str_contains ('aeiou ' , $ lowerPluralRev [$ j ]);
451
448
452
449
if (!$ map [2 ] && $ nextIsVowel ) {
453
450
// suffix may not succeed a vowel but next char is one
@@ -492,9 +489,6 @@ public function singularize(string $plural): array
492
489
return [$ plural ];
493
490
}
494
491
495
- /**
496
- * {@inheritdoc}
497
- */
498
492
public function pluralize (string $ singular ): array
499
493
{
500
494
$ singularRev = strrev ($ singular );
@@ -527,7 +521,7 @@ public function pluralize(string $singular): array
527
521
if ($ j === $ suffixLength ) {
528
522
// Is there any character preceding the suffix in the plural string?
529
523
if ($ j < $ singularLength ) {
530
- $ nextIsVowel = false !== strpos ('aeiou ' , $ lowerSingularRev [$ j ]);
524
+ $ nextIsVowel = str_contains ('aeiou ' , $ lowerSingularRev [$ j ]);
531
525
532
526
if (!$ map [2 ] && $ nextIsVowel ) {
533
527
// suffix may not succeed a vowel but next char is one
0 commit comments