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
|
||||
|
@@ -110,9 +110,6 @@ final class FrenchInflector implements InflectorInterface
|
||||
*/
|
||||
private const UNINFLECTED = '/^(abcès|accès|abus|albatros|anchois|anglais|autobus|bois|brebis|carquois|cas|chas|colis|concours|corps|cours|cyprès|décès|devis|discours|dos|embarras|engrais|entrelacs|excès|fils|fois|gâchis|gars|glas|héros|intrus|jars|jus|kermès|lacis|legs|lilas|marais|mars|matelas|mépris|mets|mois|mors|obus|os|palais|paradis|parcours|pardessus|pays|plusieurs|poids|pois|pouls|printemps|processus|progrès|puits|pus|rabais|radis|recors|recours|refus|relais|remords|remous|rictus|rhinocéros|repas|rubis|sans|sas|secours|sens|souris|succès|talus|tapis|tas|taudis|temps|tiers|univers|velours|verglas|vernis|virus)$/i';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function singularize(string $plural): array
|
||||
{
|
||||
if ($this->isInflectedWord($plural)) {
|
||||
@@ -130,9 +127,6 @@ final class FrenchInflector implements InflectorInterface
|
||||
return [$plural];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function pluralize(string $singular): array
|
||||
{
|
||||
if ($this->isInflectedWord($singular)) {
|
||||
|
Reference in New Issue
Block a user