Total Complexity | 2 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
16 | class Router |
||
17 | { |
||
18 | public const DEVICES_GET = 'DEVICES_GET'; |
||
19 | public const DEVICE_GET = 'DEVICE_GET'; |
||
20 | public const DEVICE_UPDATE = 'DEVICE_UPDATE'; |
||
21 | public const DEVICE_DELETE = 'DEVICE_DELETE'; |
||
22 | |||
23 | private $methods = [ |
||
24 | 2 | self::DEVICES_GET => ['/devices', Route::METHOD_GET], |
|
25 | self::DEVICE_GET => ['/device/{id}', Route::METHOD_GET], |
||
26 | 2 | self::DEVICE_UPDATE => ['/device/{id}', Route::METHOD_PUT], |
|
27 | 1 | self::DEVICE_DELETE => ['/device/{id}', Route::METHOD_DELETE], |
|
28 | ]; |
||
29 | 1 | ||
30 | public function get(string $identifier, array $routeParameter = []): Route |
||
38 |