mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-06 11:32:40 +00:00
Fixing most coding standard issues in Utility/
This commit is contained in:
parent
acccdcde1f
commit
9d325fe46e
13 changed files with 58 additions and 65 deletions
|
@ -1,11 +1,5 @@
|
|||
<?php
|
||||
/**
|
||||
* Pluralize and singularize English words.
|
||||
*
|
||||
* Used by Cake's naming conventions throughout the framework.
|
||||
*
|
||||
* PHP 5
|
||||
*
|
||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||
*
|
||||
|
@ -350,7 +344,6 @@ class Inflector {
|
|||
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/inflector.html#Inflector::pluralize
|
||||
*/
|
||||
public static function pluralize($word) {
|
||||
|
||||
if (isset(self::$_cache['pluralize'][$word])) {
|
||||
return self::$_cache['pluralize'][$word];
|
||||
}
|
||||
|
@ -394,7 +387,6 @@ class Inflector {
|
|||
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/inflector.html#Inflector::singularize
|
||||
*/
|
||||
public static function singularize($word) {
|
||||
|
||||
if (isset(self::$_cache['singularize'][$word])) {
|
||||
return self::$_cache['singularize'][$word];
|
||||
}
|
||||
|
@ -552,6 +544,7 @@ class Inflector {
|
|||
$map = self::$_transliteration + $merge;
|
||||
return preg_replace(array_keys($map), array_values($map), $string);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Store the initial state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue