| Total Complexity | 7 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 85.71% |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | class Lexer |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * Convert plural into singular form |
||
| 10 | * # buses => bus |
||
| 11 | * # products => product |
||
| 12 | * # stores => store |
||
| 13 | * # categories => category |
||
| 14 | * |
||
| 15 | * @param string $name |
||
| 16 | * @return string |
||
| 17 | */ |
||
| 18 | 6 | public static function getSingularForm(string $name): string |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Convert singular into plural form |
||
| 33 | * # bus => buses |
||
| 34 | * # product => products |
||
| 35 | * # store => stores |
||
| 36 | * # category => categories |
||
| 37 | * |
||
| 38 | * @param string $name |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | 8 | public static function getPluralForm(string $name): string |
|
| 52 |