mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Minor optimization on Inflector::variable
This commit is contained in:
parent
aa3a197b26
commit
c8297ff283
1 changed files with 1 additions and 1 deletions
|
@ -481,7 +481,7 @@ class Inflector extends Object {
|
|||
function variable($string) {
|
||||
$string = Inflector::camelize(Inflector::underscore($string));
|
||||
$replace = strtolower(substr($string, 0, 1));
|
||||
return preg_replace('/\\w/', $replace, $string, 1);
|
||||
return $replace . substr($string, 1);
|
||||
}
|
||||
/**
|
||||
* Returns a string with all spaces converted to underscores (by default), accented
|
||||
|
|
Loading…
Reference in a new issue