src/Behat/Behat/HelperContainer/ArgumentAutowirer.php
public function autowireArguments(ReflectionFunctionAbstract $reflection, array $arguments)
    {
        $newArguments = $arguments;
        foreach ($reflection->getParameters() as $index => $parameter) {
            if ($this->isArgumentWireable($newArguments, $index, $parameter)) {
                $newArguments[$index] = $this->container->get($parameter->getClass()->getName());
            }
        }

        return $newArguments;
    }
public function autowireArguments(ReflectionFunctionAbstract $reflection, array $arguments)
    {
        $newArguments = $arguments;
        foreach ($reflection->getParameters() as $index => $parameter) {
            if ($this->isArgumentWireable($newArguments, $index, $parameter)) {
                $newArguments[$index] = $this->container->get($parameter->getClass()->getName());
            }
        }

        return $newArguments;
    }
public function autowireArguments ( ReflectionFunctionAbstract $ reflection , array $ arguments ) { $ newArguments = $ arguments ; foreach ( $ reflection -> getParameters ( ) as $ index => $ parameter ) { if ( $ this -> isArgumentWireable ( $ newArguments , $ index , $ parameter ) ) { $ newArguments [ $ index ] = $ this -> container -> get ( $ parameter -> getClass ( ) -> getName ( ) ) ; } } return $ newArguments ; }
Autowires given arguments using provided container.

@param ReflectionFunctionAbstract $reflection
@param array $arguments

@return array

@throws ContainerExceptionInterface if unset argument typehint can not be resolved from container
Autowires given arguments using provided container .