Lines
100.00%
5 / 5
Methods
100.00%
2 / 2
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| process | 100.00% | 4 / 4 | 100.00% | 1 / 1 | 4 | ||
| 11 | final readonly class NamedArgumentsPass implements CompilerPassInterface | |
| 12 | { | |
| 13 | public function __construct(private NamedArguments $arguments) {} | |
| 14 | ||
| 15 | public function process(ContainerBuilder $container): void | |
| 16 | { | |
| 17 | $bindings = $this->arguments->toBoundArguments(); | |
| 18 | ||
| 19 | foreach ($container->getDefinitions() as $definition) { | |
| 20 | if ($definition->isAutowired() && !$definition->isSynthetic()) { | |
| 21 | $definition->setBindings([...$bindings, ...$definition->getBindings()]); | |
| 22 | } | |
| 23 | } | |
| 24 | } | |
| 25 | } |