| Total Complexity | 7 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class RestGroupFactory |
||
| 13 | { |
||
| 14 | private const ENTITY_PATTERN = '{id:\d+}'; |
||
| 15 | |||
| 16 | private const METHODS = [ |
||
| 17 | 'get' => Method::GET, |
||
| 18 | 'list' => Method::GET, |
||
| 19 | 'post' => Method::POST, |
||
| 20 | 'put' => Method::PUT, |
||
| 21 | 'delete' => Method::DELETE, |
||
| 22 | 'patch' => Method::PATCH, |
||
| 23 | 'options' => Method::OPTIONS, |
||
| 24 | ]; |
||
| 25 | |||
| 26 | 14 | public static function create(string $prefix, string $controller): Group |
|
| 29 | } |
||
| 30 | |||
| 31 | 14 | private static function createDefaultRoutes(string $controller): array |
|
| 48 |