Updated Rector to commit 98bb8581e5794641db7e2acf0cefa14f62f5e8a9

98bb8581e5 Fix singular of words ending in "ss" (#5198)
This commit is contained in:
Tomas Votruba 2023-10-25 08:11:08 +00:00
parent 23e5d4df05
commit 1b058fde9f
2 changed files with 3 additions and 3 deletions

View File

@ -81,7 +81,7 @@ final class InflectorSingularResolver
// see https://gist.github.com/peter-mcconnell/9757549
private function singularize(string $word) : string
{
$singular = ['/(quiz)zes$/i' => '\\1', '/(matr)ices$/i' => '\\1ix', '/(vert|ind)ices$/i' => '\\1ex', '/^(ox)en/i' => '\\1', '/^(axe)s$/i' => '\\1', '/(alias|status|iris|hoax|hero|gas|fax|circus|canvas|atlas)es$/i' => '\\1', '/([octop|vir])i$/i' => '\\1us', '/(cris|ax|test)es$/i' => '\\1is', '/(shoe|grave|glove|foe|dive|database|curve|cookie|cave|cache|avalanche|abuse)s$/i' => '\\1', '/(o)es$/i' => '\\1', '/(bus|lens)es$/i' => '\\1', '/([m|l])ice$/i' => '\\1ouse', '/(x|ch|ss|sh)es$/i' => '\\1', '/(m)ovies$/i' => '\\1ovie', '/(s)eries$/i' => '\\1eries', '/([^aeiouy]|qu)ies$/i' => '\\1y', '/([lr])ves$/i' => '\\1f', '/(tive)s$/i' => '\\1', '/(hive)s$/i' => '\\1', '/([^f])ves$/i' => '\\1fe', '/(^analy)ses$/i' => '\\1sis', '/((a)naly|(b)a|(d)iagno|empha|(p)arenthe|(p)rogno|(s)ynop|(t)he|(oa)|neuro)ses$/i' => '1\\2sis', '/([ti]|memorand|curricul)a$/i' => '\\1um', '/(n)ews$/i' => '\\1ews', '/s$/i' => ''];
$singular = ['/(quiz)zes$/i' => '\\1', '/(matr)ices$/i' => '\\1ix', '/(vert|ind)ices$/i' => '\\1ex', '/^(ox)en/i' => '\\1', '/^(axe)s$/i' => '\\1', '/(alias|status|iris|hoax|hero|gas|fax|circus|canvas|atlas)es$/i' => '\\1', '/([octop|vir])i$/i' => '\\1us', '/(cris|ax|test)es$/i' => '\\1is', '/(shoe|grave|glove|foe|dive|database|curve|cookie|cave|cache|avalanche|abuse)s$/i' => '\\1', '/(o)es$/i' => '\\1', '/(bus|lens)es$/i' => '\\1', '/([m|l])ice$/i' => '\\1ouse', '/(x|ch|ss|sh)es$/i' => '\\1', '/(m)ovies$/i' => '\\1ovie', '/(s)eries$/i' => '\\1eries', '/([^aeiouy]|qu)ies$/i' => '\\1y', '/([lr])ves$/i' => '\\1f', '/(tive)s$/i' => '\\1', '/(hive)s$/i' => '\\1', '/([^f])ves$/i' => '\\1fe', '/(^analy)ses$/i' => '\\1sis', '/((a)naly|(b)a|(d)iagno|empha|(p)arenthe|(p)rogno|(s)ynop|(t)he|(oa)|neuro)ses$/i' => '1\\2sis', '/([ti]|memorand|curricul)a$/i' => '\\1um', '/(n)ews$/i' => '\\1ews', '/(?<!s)s$/i' => ''];
$irregular = ['alumnus' => 'alumni', 'person' => 'people', 'man' => 'men', 'bacillus' => 'bacilli', 'criterion' => 'criteria', 'fungus' => 'fungi', 'foot' => 'feet', 'goose' => 'geese', 'genus' => 'genera', 'hippopotamus' => 'hippopotami', 'child' => 'children', 'code' => 'codes', 'octopus' => 'octopuses', 'olive' => 'olives', 'chateau' => 'chateaux', 'plateau' => 'plateaux', 'niveau' => 'niveaux', 'passerby' => 'passersby', 'save' => 'saves', 'sex' => 'sexes', 'syllabus' => 'syllabi', 'stimulus' => 'stimuli', 'sku' => 'skus', 'sieve' => 'sieves', 'taxon' => 'taxa', 'taxi' => 'taxis', 'tax' => 'taxes', 'tooth' => 'teeth', 'tights' => 'tights', 'Thief' => 'Thieves', 'terminus' => 'termini', 'larva' => 'larvae', 'leaf' => 'leaves', 'loaf' => 'loaves', 'move' => 'moves', 'nucleus' => 'nuclei', 'valve' => 'valves', 'wave' => 'waves', 'zombie' => 'zombies'];
// keep words ending in $ignore
$ignore = ['breeches', 'britches', 'cantus', 'chassis', 'corps', 'coreopsis', 'contretemps', 'coitus', 'clothes', 'clippers', 'data', 'diabetes', 'debris', 'equipment', 'gallows', 'hijinks', 'herpes', 'headquarters', 'information', 'rice', 'socialmedia', 'jeans', 'jackanapes', 'nodemedia', 'money', 'mumps', 'mews', 'innings', 'nexus', 'rhinoceros', 'rabies', 'pants', 'police', 'pliers', 'progress', 'proceedings', 'pincers', 'scissors', 'species', 'series', 'status', 'shorts', 'shears', 'fish', 'sheep', 'press', 'sms', 'trousers', 'trivia', 'yengeese'];

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '1d3fc91bd5e0154daae34b1efdb64a6f78f47c89';
public const PACKAGE_VERSION = '98bb8581e5794641db7e2acf0cefa14f62f5e8a9';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-10-24 16:59:49';
public const RELEASE_DATE = '2023-10-25 15:07:54';
/**
* @var int
*/