File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -125,19 +125,14 @@ public static function toUnderscoreSeparated($input)
125
125
*/
126
126
public static function toVariable ($ input )
127
127
{
128
- // Remove dashes and underscores, then convert to camel case.
129
- $ input = self ::toSpaceSeparated ($ input );
128
+ // Convert to camel case.
130
129
$ input = self ::toCamelCase ($ input );
131
130
132
131
// Remove leading digits.
133
132
$ input = preg_replace ('#^[0-9]+# ' , '' , $ input );
134
133
135
134
// Lowercase the first character.
136
- $ first = substr ($ input , 0 , 1 );
137
- $ first = strtolower ($ first );
138
-
139
- // Replace the first character with the lowercase character.
140
- $ input = substr_replace ($ input , $ first , 0 , 1 );
135
+ $ input = lcfirst ($ input );
141
136
142
137
return $ input ;
143
138
}
You can’t perform that action at this time.
0 commit comments