Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
11 | final class LayoutDataProvider implements ItemDataProviderInterface, RestrictedDataProviderInterface |
||
12 | { |
||
13 | private $repository; |
||
14 | |||
15 | /** |
||
16 | * LayoutDataProvider constructor. |
||
17 | * |
||
18 | * @param LayoutRepository $repository |
||
19 | */ |
||
20 | public function __construct(LayoutRepository $repository) |
||
21 | { |
||
22 | $this->repository = $repository; |
||
23 | 5 | } |
|
24 | |||
25 | 5 | /** |
|
26 | 5 | * @param string $resourceClass |
|
27 | * @param string|null $operationName |
||
28 | * @param array $context |
||
29 | * @return bool |
||
30 | */ |
||
31 | public function supports(string $resourceClass, string $operationName = null, array $context = []): bool |
||
34 | 4 | } |
|
35 | |||
36 | 4 | /** |
|
37 | * @param string $resourceClass |
||
38 | * @param int|string $id |
||
39 | * @param string|null $operationName |
||
40 | * @param array $context |
||
41 | * @return Layout|null |
||
42 | * @throws ResourceClassNotSupportedException |
||
43 | */ |
||
44 | public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []): ?Layout |
||
50 | } |
||
51 | } |
||
52 |