Total Complexity | 3 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | class LocatorPlugin implements DependencyProviderInterface |
||
23 | { |
||
24 | private ?KernelInterface $kernel = null; |
||
25 | |||
26 | /** |
||
27 | * {@inheritDoc} |
||
28 | */ |
||
29 | 1 | public function provideDependencies(Container $container): void |
|
30 | { |
||
31 | 1 | $container->register(LocatorFacadeInterface::class, function ( |
|
32 | 1 | KernelInterface $kernel |
|
33 | 1 | ) { |
|
34 | 1 | $this->kernel = $kernel; |
|
35 | |||
36 | 1 | return $this->createLocatorFacade(); |
|
37 | 1 | }); |
|
38 | } |
||
39 | |||
40 | 1 | protected function createLocatorFacade(): LocatorFacadeInterface |
|
41 | { |
||
42 | 1 | return new LocatorFacade( |
|
43 | 1 | $this->createLocatorFactory() |
|
44 | 1 | ); |
|
45 | } |
||
46 | |||
47 | 1 | protected function createLocatorFactory(): LocatorFactoryInterface |
|
50 | } |
||
51 | } |
||
52 |