@@ -25,8 +25,32 @@ final class EnglishInflector implements InflectorInterface
2525 // Fourth entry: Whether the suffix may succeed a consonant
2626 // Fifth entry: singular suffix, normal
2727
28- // bacteria (bacterium), criteria (criterion), phenomena (phenomenon)
29- ['a ' , 1 , true , true , ['on ' , 'um ' ]],
28+ // bacteria (bacterium)
29+ ['airetcab ' , 8 , true , true , 'bacterium ' ],
30+
31+ // corpora (corpus)
32+ ['aroproc ' , 7 , true , true , 'corpus ' ],
33+
34+ // criteria (criterion)
35+ ['airetirc ' , 8 , true , true , 'criterion ' ],
36+
37+ // curricula (curriculum)
38+ ['alucirruc ' , 9 , true , true , 'curriculum ' ],
39+
40+ // genera (genus)
41+ ['areneg ' , 6 , true , true , 'genus ' ],
42+
43+ // media (medium)
44+ ['aidem ' , 5 , true , true , 'medium ' ],
45+
46+ // memoranda (memorandum)
47+ ['adnaromem ' , 9 , true , true , 'memorandum ' ],
48+
49+ // phenomena (phenomenon)
50+ ['anemonehp ' , 9 , true , true , 'phenomenon ' ],
51+
52+ // strata (stratum)
53+ ['atarts ' , 6 , true , true , 'stratum ' ],
3054
3155 // nebulae (nebula)
3256 ['ea ' , 2 , true , true , 'a ' ],
@@ -141,7 +165,7 @@ final class EnglishInflector implements InflectorInterface
141165 // shoes (shoe)
142166 ['se ' , 2 , true , true , ['' , 'e ' ]],
143167
144- // status (status)
168+ // status (status)
145169 ['sutats ' , 6 , true , true , 'status ' ],
146170
147171 // tags (tag)
@@ -241,7 +265,7 @@ final class EnglishInflector implements InflectorInterface
241265 // albums (album)
242266 ['mubla ' , 5 , true , true , 'albums ' ],
243267
244- // bacteria (bacterium), criteria (criterion ), phenomena (phenomenon)
268+ // bacteria (bacterium), curricula (curriculum ), media (medium), memoranda (memorandum), phenomena (phenomenon), strata (stratum )
245269 ['mu ' , 2 , true , true , 'a ' ],
246270
247271 // men (man), women (woman)
@@ -250,20 +274,11 @@ final class EnglishInflector implements InflectorInterface
250274 // people (person)
251275 ['nosrep ' , 6 , true , true , ['persons ' , 'people ' ]],
252276
253- // bacteria (bacterium), criteria (criterion), phenomena (phenomenon)
254- ['noi ' , 3 , true , true , 'ions ' ],
255-
256- // coupon (coupons)
257- ['nop ' , 3 , true , true , 'pons ' ],
258-
259- // seasons (season), treasons (treason), poisons (poison), lessons (lesson)
260- ['nos ' , 3 , true , true , 'sons ' ],
261-
262- // icons (icon)
263- ['noc ' , 3 , true , true , 'cons ' ],
277+ // criteria (criterion)
278+ ['noiretirc ' , 9 , true , true , 'criteria ' ],
264279
265- // bacteria (bacterium), criteria (criterion), phenomena (phenomenon)
266- ['no ' , 2 , true , true , 'a ' ],
280+ // phenomena (phenomenon)
281+ ['nonemonehp ' , 10 , true , true , 'phenomena ' ],
267282
268283 // echoes (echo)
269284 ['ohce ' , 4 , true , true , 'echoes ' ],
@@ -404,9 +419,6 @@ final class EnglishInflector implements InflectorInterface
404419 'erawdrah ' ,
405420 ];
406421
407- /**
408- * {@inheritdoc}
409- */
410422 public function singularize (string $ plural ): array
411423 {
412424 $ pluralRev = strrev ($ plural );
@@ -438,7 +450,7 @@ public function singularize(string $plural): array
438450 if ($ j === $ suffixLength ) {
439451 // Is there any character preceding the suffix in the plural string?
440452 if ($ j < $ pluralLength ) {
441- $ nextIsVowel = false !== strpos ('aeiou ' , $ lowerPluralRev [$ j ]);
453+ $ nextIsVowel = str_contains ('aeiou ' , $ lowerPluralRev [$ j ]);
442454
443455 if (!$ map [2 ] && $ nextIsVowel ) {
444456 // suffix may not succeed a vowel but next char is one
@@ -483,9 +495,6 @@ public function singularize(string $plural): array
483495 return [$ plural ];
484496 }
485497
486- /**
487- * {@inheritdoc}
488- */
489498 public function pluralize (string $ singular ): array
490499 {
491500 $ singularRev = strrev ($ singular );
@@ -518,7 +527,7 @@ public function pluralize(string $singular): array
518527 if ($ j === $ suffixLength ) {
519528 // Is there any character preceding the suffix in the plural string?
520529 if ($ j < $ singularLength ) {
521- $ nextIsVowel = false !== strpos ('aeiou ' , $ lowerSingularRev [$ j ]);
530+ $ nextIsVowel = str_contains ('aeiou ' , $ lowerSingularRev [$ j ]);
522531
523532 if (!$ map [2 ] && $ nextIsVowel ) {
524533 // suffix may not succeed a vowel but next char is one
0 commit comments