Total Complexity | 7 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 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 | public static function create(string $prefix, string $controller): Group |
||
29 | } |
||
30 | |||
31 | private static function createDefaultRoutes(string $controller): array |
||
48 |