| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public static function underscore($str) |
||
| 17 | { |
||
| 18 | if (! isset(static::$cache['underscore'][$str])) { |
||
| 19 | $str = strtolower($str); |
||
| 20 | $str = preg_replace("/[^a-z0-9]+/", ' ', $str); |
||
| 21 | |||
| 22 | static::$cache['underscore'][$str] = str_replace(' ', '_', $str); |
||
| 23 | } |
||
| 24 | |||
| 25 | return static::$cache['underscore'][$str]; |
||
| 26 | } |
||
| 62 |