| Total Complexity | 5 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class LazyLoadingDriver implements DriverInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var ContainerInterface|PsrContainerInterface |
||
| 15 | */ |
||
| 16 | private $container; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | private $realDriverId; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param ContainerInterface|PsrContainerInterface $container |
||
| 25 | */ |
||
| 26 | 3 | public function __construct($container, string $realDriverId) |
|
| 27 | { |
||
| 28 | 3 | if (!$container instanceof PsrContainerInterface && !$container instanceof ContainerInterface) { |
|
|
|
|||
| 29 | 1 | throw new \InvalidArgumentException(sprintf('The container must be an instance of %s or %s (%s given).', PsrContainerInterface::class, ContainerInterface::class, \is_object($container) ? \get_class($container) : \gettype($container))); |
|
| 30 | } |
||
| 31 | |||
| 32 | 2 | $this->container = $container; |
|
| 33 | 2 | $this->realDriverId = $realDriverId; |
|
| 34 | 2 | } |
|
| 35 | |||
| 36 | 2 | public function loadMetadataForClass(\ReflectionClass $class): ?ClassMetadata |
|
| 39 | } |
||
| 40 | } |
||
| 41 |