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