private function getArgumentsForParametersFromWiring($parameters, $locator): array
    {
        $arguments = [];
        foreach ($parameters as $index => $parameter) {
            $typeHint = $parameter->getClass() ? $parameter->getClass()->getName() : null;
            if (isset($locator[$typeHint])) {
                $arguments[] = $locator[$typeHint];
                continue;
            }

            $parameterName = $parameter->getName();
            if (isset($locator[$parameterName])) {
                $arguments[] = $locator[$parameterName];
                continue;
            }

            $arguments[] = null;
        }

        return $arguments;
    }
private function getArgumentsForParametersFromWiring($parameters, $locator): array
    {
        $arguments = [];
        foreach ($parameters as $index => $parameter) {
            $typeHint = $parameter->getClass() ? $parameter->getClass()->getName() : null;
            if (isset($locator[$typeHint])) {
                $arguments[] = $locator[$typeHint];
                continue;
            }

            $parameterName = $parameter->getName();
            if (isset($locator[$parameterName])) {
                $arguments[] = $locator[$parameterName];
                continue;
            }

            $arguments[] = null;
        }

        return $arguments;
    }
private function getArgumentsForParametersFromWiring ( $ parameters , $ locator ) : array { $ arguments = [ ] ; foreach ( $ parameters as $ index => $ parameter ) { $ typeHint = $ parameter -> getClass ( ) ? $ parameter -> getClass ( ) -> getName ( ) : null ; if ( isset ( $ locator [ $ typeHint ] ) ) { $ arguments [ ] = $ locator [ $ typeHint ] ; continue ; } $ parameterName = $ parameter -> getName ( ) ; if ( isset ( $ locator [ $ parameterName ] ) ) { $ arguments [ ] = $ locator [ $ parameterName ] ; continue ; } $ arguments [ ] = null ; } return $ arguments ; }
Retrieves the arguments that need to be passed to the Factory Method with the given Parameters.

@param \ReflectionParameter[] $parameters
@param mixed[]                $locator

@return mixed[] A series of values that can be passed to the Factory Method of the tag whose parameters
is provided with this method.
Retrieves the arguments that need to be passed to the Factory Method with the given Parameters .