8000 bug #17745 Added more exceptions to singularify method (javiereguiluz) · symfony/symfony@92d291a · GitHub
[go: up one dir, main page]

Skip to content

Commit 92d291a

Browse files
committed
bug #17745 Added more exceptions to singularify method (javiereguiluz)
This PR was merged into the 2.3 branch. Discussion ---------- Added more exceptions to singularify method | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #16532 | License | MIT | Doc PR | - Added exceptions for `series`, `news` and `services`. Commits ------- f5daa0d Added more exceptions to singularify method
2 parents 81d654f + f5daa0d commit 92d291a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/Symfony/Component/PropertyAccess/StringUtil.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ class StringUtil
3939
// nebulae (nebula)
4040
array('ea', 2, true, true, 'a'),
4141

42+
// services (service)
43+
array('secivres', 8, true, true, 'service'),
44+
4245
// mice (mouse), lice (louse)
4346
array('eci', 3, false, true, 'ouse'),
4447

@@ -66,6 +69,12 @@ class StringUtil
6669
// movies (movie)
6770
array('seivom', 6, true, true, 'movie'),
6871

72+
// news (news)
73+
array('swen', 4, true, true, 'news'),
74+
75+
// series (series)
76+
array('seires', 6, true, true, 'series'),
77+
6978
// babies (baby)
7079
array('sei', 3, false, true, 'y'),
7180

src/Symfony/Component/PropertyAccess/Tests/StringUtilTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ public function singularifyProvider()
102102
array('movies', 'movie'),
103103
array('nebulae', 'nebula'),
104104
array('neuroses', array('neuros', 'neurose', 'neurosis')),
105+
array('news', 'news'),
105106
array('oases', array('oas', 'oase', 'oasis')),
106107
array('objectives', 'objective'),
107108
array('oxen', 'ox'),
@@ -120,6 +121,8 @@ public function singularifyProvider()
120121
array('scarves', array('scarf', 'scarve', 'scarff')),
121122
array('schemas', 'schema'), //schemata
122123
array('selfies', 'selfie'),
124+
array('series', 'series'),
125+
array('services', 'service'),
123126
array('sheriffs', 'sheriff'),
124127
array('shoes', array('sho', 'shoe')),
125128
array('spies', 'spy'),

0 commit comments

Comments
 (0)
0