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