bug #41105 [Inflector][String] Fixed singularize edges
> edge
(ruudk)
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Inflector][String] Fixed singularize `edges` > `edge`
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
I noticed that calling `$inflector->singularize('edges');` returned `['edg', 'edges']`.
It should be `edge`, only. See https://en.wiktionary.org/wiki/edge
Commits
-------
ebfb0c9944
[Inflector][String] Fixed singularize `edges` > `edge`
This commit is contained in:
commit
68ee96d371
@ -123,6 +123,9 @@ final class Inflector
|
||||
// fees (fee), trees (tree), employees (employee)
|
||||
['see', 3, true, true, 'ee'],
|
||||
|
||||
// edges (edge)
|
||||
['segd', 4, true, true, 'dge'],
|
||||
|
||||
// roses (rose), garages (garage), cassettes (cassette),
|
||||
// waltzes (waltz), heroes (hero), bushes (bush), arches (arch),
|
||||
// shoes (shoe)
|
||||
@ -314,14 +317,32 @@ final class Inflector
|
||||
*/
|
||||
private const UNINFLECTED = [
|
||||
'',
|
||||
|
||||
// data
|
||||
'atad',
|
||||
|
||||
// deer
|
||||
'reed',
|
||||
|
||||
// feedback
|
||||
'kcabdeef',
|
||||
|
||||
// fish
|
||||
'hsif',
|
||||
|
||||
// info
|
||||
'ofni',
|
||||
|
||||
// moose
|
||||
'esoom',
|
||||
|
||||
// series
|
||||
'seires',
|
||||
|
||||
// sheep
|
||||
'peehs',
|
||||
|
||||
// species
|
||||
'seiceps',
|
||||
];
|
||||
|
||||
|
@ -66,6 +66,7 @@ class InflectorTest extends TestCase
|
||||
['drivers', 'driver'],
|
||||
['dwarves', ['dwarf', 'dwarve', 'dwarff']],
|
||||
['echoes', ['echo', 'echoe']],
|
||||
['edges', 'edge'],
|
||||
['elves', ['elf', 'elve', 'elff']],
|
||||
['emphases', ['emphas', 'emphase', 'emphasis']],
|
||||
['employees', 'employee'],
|
||||
@ -210,6 +211,7 @@ class InflectorTest extends TestCase
|
||||
['driver', 'drivers'],
|
||||
['dwarf', ['dwarfs', 'dwarves']],
|
||||
['echo', 'echoes'],
|
||||
['edge', 'edges'],
|
||||
['elf', ['elfs', 'elves']],
|
||||
['emphasis', 'emphases'],
|
||||
['fax', ['facies', 'faxes']],
|
||||
|
Reference in New Issue
Block a user