Skip to content
Permalink
Browse files

Update "static" keyword instead of class name.

  • Loading branch information...
ADmad committed Sep 1, 2014
1 parent f168420 commit c96d1b0aad5a94844722c571caa43131d333edb4
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/Utility/Inflector.php
@@ -577,7 +577,7 @@ public static function singularize($word) {
*/
public static function camelize($lowerCaseAndUnderscoredWord) {
if (!($result = static::_cache(__FUNCTION__, $lowerCaseAndUnderscoredWord))) {
$result = str_replace(' ', '', Inflector::humanize($lowerCaseAndUnderscoredWord));
$result = str_replace(' ', '', static::humanize($lowerCaseAndUnderscoredWord));
static::_cache(__FUNCTION__, $lowerCaseAndUnderscoredWord, $result);
}
return $result;
@@ -640,7 +640,7 @@ public static function humanize($lowerCaseAndUnderscoredWord) {
*/
public static function tableize($className) {
if (!($result = static::_cache(__FUNCTION__, $className))) {
$result = Inflector::pluralize(Inflector::underscore($className));
$result = static::pluralize(Inflector::underscore($className));
static::_cache(__FUNCTION__, $className, $result);
}
return $result;
@@ -655,7 +655,7 @@ public static function tableize($className) {
*/
public static function classify($tableName) {
if (!($result = static::_cache(__FUNCTION__, $tableName))) {
$result = Inflector::camelize(Inflector::singularize($tableName));
$result = static::camelize(static::singularize($tableName));
static::_cache(__FUNCTION__, $tableName, $result);
}
return $result;
@@ -670,7 +670,7 @@ public static function classify($tableName) {
*/
public static function variable($string) {
if (!($result = static::_cache(__FUNCTION__, $string))) {
$camelized = Inflector::camelize(Inflector::underscore($string));
$camelized = static::camelize(static::underscore($string));
$replace = strtolower(substr($camelized, 0, 1));
$result = preg_replace('/\\w/', $replace, $camelized, 1);
static::_cache(__FUNCTION__, $string, $result);

0 comments on commit c96d1b0

Please sign in to comment.
You can’t perform that action at this time.