private function buildParameterArray($methodSignature, $providedParameters)
    {
        $parameters = [];
        foreach ($methodSignature as $position => $parameterData) {
            if (!isset($parameterData['variadic'])) {
                $parameters[$position] = $this->resolveParameter($position, $parameterData, $providedParameters);
            } else {
                // variadic parameter must be the last one, so
                // the rest of the provided paramters should be piped
                // into it to mimic native php behaviour
                foreach ($providedParameters as $variadicParameter) {
                    $parameters[] = $variadicParameter;
                }
            }
        }
        return $parameters;
    }
private function buildParameterArray($methodSignature, $providedParameters)
    {
        $parameters = [];
        foreach ($methodSignature as $position => $parameterData) {
            if (!isset($parameterData['variadic'])) {
                $parameters[$position] = $this->resolveParameter($position, $parameterData, $providedParameters);
            } else {
                // variadic parameter must be the last one, so
                // the rest of the provided paramters should be piped
                // into it to mimic native php behaviour
                foreach ($providedParameters as $variadicParameter) {
                    $parameters[] = $variadicParameter;
                }
            }
        }
        return $parameters;
    }
private function buildParameterArray ( $ methodSignature , $ providedParameters ) { $ parameters = [ ] ; foreach ( $ methodSignature as $ position => $ parameterData ) { if ( ! isset ( $ parameterData [ 'variadic' ] ) ) { $ parameters [ $ position ] = $ this -> resolveParameter ( $ position , $ parameterData , $ providedParameters ) ; } else { // variadic parameter must be the last one, so // the rest of the provided paramters should be piped // into it to mimic native php behaviour foreach ( $ providedParameters as $ variadicParameter ) { $ parameters [ ] = $ variadicParameter ; } } } return $ parameters ; }
Construct the parameter array to be passed to a method call based on its parameter signature

@param array $methodSignature
@param array $providedParameters
@return array
@throws InjectorInvocationException
@throws MissingRequiredParameterException
@throws \InvalidArgumentException
@throws \ReflectionException
Construct the parameter array to be passed to a method call based on its parameter signature