Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
AbstractRestApiRouteDefinition | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
getController | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getUrlPrefixes | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | namespace Apie\RestApi\RouteDefinitions; |
3 | |
4 | use Apie\Common\Enums\UrlPrefix; |
5 | use Apie\Common\Lists\UrlPrefixList; |
6 | use Apie\Common\RouteDefinitions\AbstractRestApiRouteDefinition as CommonRestApiRouteDefinition; |
7 | use Apie\RestApi\Controllers\RestApiController; |
8 | |
9 | abstract class AbstractRestApiRouteDefinition extends CommonRestApiRouteDefinition |
10 | { |
11 | /** |
12 | * @return class-string<RestApiController> |
13 | */ |
14 | final public function getController(): string |
15 | { |
16 | return RestApiController::class; |
17 | } |
18 | |
19 | final public function getUrlPrefixes(): UrlPrefixList |
20 | { |
21 | return new UrlPrefixList([UrlPrefix::API]); |
22 | } |
23 | } |