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