src/DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php
private function replaceDefaultArguments(
        array $defaultArguments,
        Definition $definition,
        Definition $parentDefinition = null
    ): void {
        $arguments = $definition->getArguments();
        $parentArguments = $parentDefinition ? $parentDefinition->getArguments() : [];

        foreach ($defaultArguments as $index => $value) {
            $declaredInParent = $parentDefinition && \array_key_exists($index, $parentArguments);
            $argumentValue = $declaredInParent ? $parentArguments[$index] : $arguments[$index];

            if (null === $argumentValue || 0 === \strlen($argumentValue)) {
                $arguments[$declaredInParent ? sprintf('index_%s', $index) : $index] = $value;
            }
        }

        $definition->setArguments($arguments);
    }
private function replaceDefaultArguments(
        array $defaultArguments,
        Definition $definition,
        Definition $parentDefinition = null
    ): void {
        $arguments = $definition->getArguments();
        $parentArguments = $parentDefinition ? $parentDefinition->getArguments() : [];

        foreach ($defaultArguments as $index => $value) {
            $declaredInParent = $parentDefinition && \array_key_exists($index, $parentArguments);
            $argumentValue = $declaredInParent ? $parentArguments[$index] : $arguments[$index];

            if (null === $argumentValue || 0 === \strlen($argumentValue)) {
                $arguments[$declaredInParent ? sprintf('index_%s', $index) : $index] = $value;
            }
        }

        $definition->setArguments($arguments);
    }
private function replaceDefaultArguments ( array $ defaultArguments , Definition $ definition , Definition $ parentDefinition = null ) : void { $ arguments = $ definition -> getArguments ( ) ; $ parentArguments = $ parentDefinition ? $ parentDefinition -> getArguments ( ) : [ ] ; foreach ( $ defaultArguments as $ index => $ value ) { $ declaredInParent = $ parentDefinition && \ array_key_exists ( $ index , $ parentArguments ) ; $ argumentValue = $ declaredInParent ? $ parentArguments [ $ index ] : $ arguments [ $ index ] ; if ( null === $ argumentValue || 0 === \ strlen ( $ argumentValue ) ) { $ arguments [ $ declaredInParent ? sprintf ( 'index_%s' , $ index ) : $ index ] = $ value ; } } $ definition -> setArguments ( $ arguments ) ; }
Replace the empty arguments required by the Admin service definition.
Replace the empty arguments required by the Admin service definition .