package and depencies
This commit is contained in:
@@ -350,9 +350,6 @@ final class EnglishInflector implements InflectorInterface
|
||||
'seiceps',
|
||||
];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function singularize(string $plural): array
|
||||
{
|
||||
$pluralRev = strrev($plural);
|
||||
@@ -384,7 +381,7 @@ final class EnglishInflector implements InflectorInterface
|
||||
if ($j === $suffixLength) {
|
||||
// Is there any character preceding the suffix in the plural string?
|
||||
if ($j < $pluralLength) {
|
||||
$nextIsVocal = false !== strpos('aeiou', $lowerPluralRev[$j]);
|
||||
$nextIsVocal = str_contains('aeiou', $lowerPluralRev[$j]);
|
||||
|
||||
if (!$map[2] && $nextIsVocal) {
|
||||
// suffix may not succeed a vocal but next char is one
|
||||
@@ -429,9 +426,6 @@ final class EnglishInflector implements InflectorInterface
|
||||
return [$plural];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function pluralize(string $singular): array
|
||||
{
|
||||
$singularRev = strrev($singular);
|
||||
@@ -464,7 +458,7 @@ final class EnglishInflector implements InflectorInterface
|
||||
if ($j === $suffixLength) {
|
||||
// Is there any character preceding the suffix in the plural string?
|
||||
if ($j < $singularLength) {
|
||||
$nextIsVocal = false !== strpos('aeiou', $lowerSingularRev[$j]);
|
||||
$nextIsVocal = str_contains('aeiou', $lowerSingularRev[$j]);
|
||||
|
||||
if (!$map[2] && $nextIsVocal) {
|
||||
// suffix may not succeed a vocal but next char is one
|
||||
|
Reference in New Issue
Block a user