Total Complexity | 4 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | class DependencyProviderBootLoader implements PluginBootLoaderInterface |
||
23 | { |
||
24 | /** |
||
25 | * @var Container |
||
26 | */ |
||
27 | private readonly ContainerInterface $container; |
||
28 | |||
29 | /** |
||
30 | * @param Container $container |
||
31 | */ |
||
32 | 1 | public function __construct(ContainerInterface $container) |
|
33 | { |
||
34 | 1 | if (!($container instanceof ContainerAutowire)) { |
|
35 | 1 | $container = new ContainerAutowire($container); |
|
36 | } |
||
37 | |||
38 | 1 | $this->container = $container; |
|
|
|||
39 | |||
40 | 1 | $this->container->register(AutowireHelperInterface::class, |
|
41 | 1 | fn () => (new AutowireHelperFactory($this->container)) |
|
42 | 1 | ->create() |
|
43 | 1 | ); |
|
44 | } |
||
45 | |||
46 | /** |
||
47 | * @TODO: uncomment at 2.0 version |
||
48 | * {@inheritDoc} |
||
49 | */ |
||
50 | 1 | public function boot(object $applicationPlugin): void |
|
57 | } |
||
58 | } |
||
59 |