Total Complexity | 3 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
24 | class RouteDataProvider implements ItemDataProviderInterface, RestrictedDataProviderInterface |
||
25 | { |
||
26 | private RouteRepository $routeRepository; |
||
27 | |||
28 | 2 | public function __construct(RouteRepository $routeRepository) |
|
31 | 2 | } |
|
32 | |||
33 | 1 | public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []) |
|
34 | { |
||
35 | 1 | return $this->routeRepository->findOneByIdOrRoute($id); |
|
36 | } |
||
37 | |||
38 | 1 | public function supports(string $resourceClass, string $operationName = null, array $context = []): bool |
|
41 | } |
||
42 | } |
||
43 |