From 97e932e3f2eb1954abf93bd1cef9d7f201407c6f Mon Sep 17 00:00:00 2001 From: Gwendolen Lynch Date: Tue, 14 Mar 2023 07:11:53 +0100 Subject: [PATCH] [String] Correct inflection of 'codes' and 'names' --- src/Symfony/Component/String/Inflector/EnglishInflector.php | 6 ++++++ .../String/Tests/Inflector/EnglishInflectorTest.php | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/Symfony/Component/String/Inflector/EnglishInflector.php b/src/Symfony/Component/String/Inflector/EnglishInflector.php index 9f2fac675c9cc..edd94dbc11ce0 100644 --- a/src/Symfony/Component/String/Inflector/EnglishInflector.php +++ b/src/Symfony/Component/String/Inflector/EnglishInflector.php @@ -55,6 +55,9 @@ final class EnglishInflector implements InflectorInterface // indices (index), appendices (appendix), prices (price) ['seci', 4, false, true, ['ex', 'ix', 'ice']], + // codes (code) + ['sedoc', 5, false, true, 'code'], + // selfies (selfie) ['seifles', 7, true, true, 'selfie'], @@ -64,6 +67,9 @@ final class EnglishInflector implements InflectorInterface // movies (movie) ['seivom', 6, true, true, 'movie'], + // names (name) + ['seman', 5, true, false, 'name'], + // conspectuses (conspectus), prospectuses (prospectus) ['sesutcep', 8, true, true, 'pectus'], diff --git a/src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php b/src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php index afe3b63911d39..f3b50fc7e2f16 100644 --- a/src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php +++ b/src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php @@ -54,6 +54,7 @@ public static function singularizeProvider() ['children', 'child'], ['circuses', ['circus', 'circuse', 'circusis']], ['cliffs', 'cliff'], + ['codes', 'code'], ['committee', 'committee'], ['crises', ['cris', 'crise', 'crisis']], ['criteria', ['criterion', 'criterium']], @@ -108,6 +109,7 @@ public static function singularizeProvider() ['mice', 'mouse'], ['moves', 'move'], ['movies', 'movie'], + ['names', 'name'], ['nebulae', 'nebula'], ['neuroses', ['neuros', 'neurose', 'neurosis']], ['news', 'news'],