Skip to content

Commit

Permalink
Update "static" keyword instead of class name.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Sep 1, 2014
1 parent f168420 commit c96d1b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Utility/Inflector.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit c96d1b0

Please sign in to comment.