| Total Complexity | 3 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Inflector |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * StuldyCase. |
||
| 9 | * |
||
| 10 | * @param string $path |
||
| 11 | * |
||
| 12 | * @return string |
||
| 13 | */ |
||
| 14 | public function stuldyCase(string $string): string |
||
| 15 | { |
||
| 16 | return str_replace(' ', '', ucwords(str_replace(['-', '_'], ' ', $string))); |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Separate words. |
||
| 21 | * |
||
| 22 | * @param string $path |
||
| 23 | * |
||
| 24 | * @return string |
||
| 25 | */ |
||
| 26 | public function words(string $string): string |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Snakeize. |
||
| 33 | * |
||
| 34 | * @param string $path |
||
| 35 | * |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | public function snakeCase(string $string): string |
||
| 45 |