Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 68dcb82

Browse files
author
Geordie
committed
fix the coding standard issue reported by fabbot.io
1 parent 5b55b6c commit 68dcb82

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/Symfony/Component/String/Inflector/EnglishInflector.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)