Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
40 | public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []): ?Layout |
||
41 | { |
||
42 | if ('default' !== $id) { |
||
43 | throw new ResourceClassNotSupportedException('LayoutDataProvider only supports the id `default`'); |
||
44 | } |
||
45 | |||
46 | return $this->repository->findOneBy(['default' => true]); |
||
47 | } |
||
49 |