Total Complexity | 5 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class Page implements RouteInterface |
||
8 | { |
||
9 | |||
10 | 3 | public static function root() |
|
13 | } |
||
14 | |||
15 | 2 | public static function create() |
|
16 | { |
||
17 | return [ |
||
18 | 2 | RouteInterface::METHOD_KEY => RouteInterface::POST_METHOD, |
|
19 | 2 | RouteInterface::ENDPOINT_KEY => Page::root(), |
|
20 | 2 | RouteInterface::PARAMS_KEY => [ |
|
21 | 2 | 'name', 'description', |
|
22 | 2 | 'amount', |
|
23 | 2 | ], |
|
24 | 2 | ]; |
|
25 | } |
||
26 | |||
27 | 2 | public static function fetch() |
|
28 | { |
||
29 | return [ |
||
30 | 2 | RouteInterface::METHOD_KEY => RouteInterface::GET_METHOD, |
|
31 | 2 | RouteInterface::ENDPOINT_KEY => Page::root() . '/{id}', |
|
32 | 2 | RouteInterface::ARGS_KEY => ['id'], |
|
33 | 2 | ]; |
|
34 | } |
||
35 | |||
36 | 2 | public static function getList() |
|
41 | 2 | ]; |
|
42 | } |
||
43 | |||
44 | 2 | public static function update() |
|
59 |