From 37cd2a3ab35a151cc0345c2624f52f028749d430 Mon Sep 17 00:00:00 2001 From: PrestaEdit Date: Thu, 1 Aug 2013 14:42:51 +0200 Subject: [PATCH] [*] Class: Tools / toCamelCase Change the name of the var to a correct name. Use the Tools method like strtolower, ucfirst and strtoupper. --- classes/Tools.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/classes/Tools.php b/classes/Tools.php index 2b9310b1d..ee4036721 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -1422,14 +1422,14 @@ class ToolsCore /** * Translates a string with underscores into camel case (e.g. first_name -> firstName) - * @prototype string public static function toCamelCase(string $str[, bool $catapitalise_first_char = false]) + * @prototype string public static function toCamelCase(string $str[, bool $capitalise_first_char = false]) */ - public static function toCamelCase($str, $catapitalise_first_char = false) + public static function toCamelCase($str, $capitalise_first_char = false) { - $str = strtolower($str); - if ($catapitalise_first_char) - $str = ucfirst($str); - return preg_replace_callback('/_+([a-z])/', create_function('$c', 'return strtoupper($c[1]);'), $str); + $str = Tools::strtolower($str); + if ($capitalise_first_char) + $str = Tools:ucfirst($str); + return preg_replace_callback('/_+([a-z])/', create_function('$c', 'return Tools::strtoupper($c[1]);'), $str); } /**