| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public static function studly($value) |
||
| 22 | { |
||
| 23 | static $studlyCache = []; |
||
| 24 | |||
| 25 | $key = $value; |
||
| 26 | |||
| 27 | if (isset($studlyCache[$key])) { |
||
| 28 | return $studlyCache[$key]; |
||
| 29 | } |
||
| 30 | |||
| 31 | $value = ucwords(str_replace(['-', '_'], ' ', $value)); |
||
| 32 | |||
| 33 | return $studlyCache[$key] = str_replace(' ', '', $value); |
||
| 34 | } |
||
| 35 | |||
| 71 |