| Conditions | 4 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []) |
||
| 38 | { |
||
| 39 | $manager = $this->managerRegistry->getManagerForClass($resourceClass); |
||
| 40 | if ( |
||
| 41 | null === $manager || |
||
| 42 | Layout::class !== $resourceClass || |
||
| 43 | $id !== 'default' |
||
| 44 | ) { |
||
| 45 | throw new ResourceClassNotSupportedException('This provider only supports getting the default layout'); |
||
| 46 | } |
||
| 47 | $repository = $manager->getRepository($resourceClass); |
||
| 48 | return $repository->findOneBy(['default' => true]); |
||
| 49 | } |
||
| 51 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..