mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixing singularization of "curves"
This commit is contained in:
parent
af12a17b81
commit
1bccc7713d
2 changed files with 5 additions and 3 deletions
|
@ -106,6 +106,7 @@ class InflectorTest extends CakeTestCase {
|
|||
$this->assertEqual(Inflector::singularize('diagnoses'), 'diagnosis');
|
||||
$this->assertEqual(Inflector::singularize('bases'), 'basis');
|
||||
$this->assertEqual(Inflector::singularize('analyses'), 'analysis');
|
||||
$this->assertEqual(Inflector::singularize('curves'), 'curve');
|
||||
|
||||
$this->assertEqual(Inflector::singularize(''), '');
|
||||
}
|
||||
|
|
|
@ -143,7 +143,8 @@ class Inflector {
|
|||
'.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox', '.*sheep', '.*ss'
|
||||
),
|
||||
'irregular' => array(
|
||||
'waves' => 'wave'
|
||||
'waves' => 'wave',
|
||||
'curves' => 'curve'
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -397,14 +398,14 @@ class Inflector {
|
|||
|
||||
if (!isset(self::$_singular['merged']['uninflected'])) {
|
||||
self::$_singular['merged']['uninflected'] = array_merge(
|
||||
self::$_singular['uninflected'],
|
||||
self::$_singular['uninflected'],
|
||||
self::$_uninflected
|
||||
);
|
||||
}
|
||||
|
||||
if (!isset(self::$_singular['merged']['irregular'])) {
|
||||
self::$_singular['merged']['irregular'] = array_merge(
|
||||
self::$_singular['irregular'],
|
||||
self::$_singular['irregular'],
|
||||
array_flip(self::$_plural['irregular'])
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue