Conditions | 1 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public static function humanize($text) |
||
13 | { |
||
14 | $text = preg_replace('/([A-Z]+)([A-Z][a-z])/', '\\1 \\2', $text); |
||
15 | $text = preg_replace('/([a-z\d])([A-Z])/', '\\1 \\2', $text); |
||
16 | $text = preg_replace('~\bdont\b~', 'don\'t', $text); |
||
17 | $text = preg_replace('/_/', ' ', $text);; |
||
18 | |||
19 | return mb_strtolower($text, 'UTF-8'); |
||
20 | } |
||
29 |