| Total Complexity | 2 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | class LazyGet implements LazyInterface |
||
| 30 | { |
||
| 31 | /** |
||
| 32 | * The service container. |
||
| 33 | * |
||
| 34 | * @var ContainerInterface |
||
| 35 | */ |
||
| 36 | protected $container; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * The service name to retrieve. |
||
| 40 | * |
||
| 41 | * @var string |
||
| 42 | */ |
||
| 43 | protected $service; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Constructor. |
||
| 47 | * |
||
| 48 | * @param ContainerInterface $container The service container. |
||
| 49 | * @param string $service The service to retrieve. |
||
| 50 | */ |
||
| 51 | 3 | public function __construct(ContainerInterface $container, string $service) |
|
| 55 | 3 | } |
|
| 56 | |||
| 57 | /** |
||
| 58 | * Invokes the closure to create the instance. |
||
| 59 | * |
||
| 60 | * @return object The object created by the closure. |
||
| 61 | */ |
||
| 62 | 3 | public function __invoke(): object |
|
| 67 |