src/Resolver/Resolver.php
protected function expandParams(Blueprint $blueprint): Blueprint
    {
        $class = $blueprint->getClassName();
        $params = $blueprint->getParams();

        $variadicParams = [];
        foreach ($this->reflector->getParams($class) as $reflectParam) {
            $paramName = $reflectParam->getName();
            if ($reflectParam->isVariadic() && is_array($params[$paramName])) {
                $variadicParams = array_merge($variadicParams, $params[$paramName]);
                unset($params[$paramName]);
                break; // There can only be one
            }

            if ($params[$paramName] instanceof DefaultValueParam) {
                $params[$paramName] = $params[$paramName]->getValue();
            }
        }

        return $blueprint->replaceParams(array_merge($params, array_values($variadicParams)));
    }
protected function expandParams(Blueprint $blueprint): Blueprint
    {
        $class = $blueprint->getClassName();
        $params = $blueprint->getParams();

        $variadicParams = [];
        foreach ($this->reflector->getParams($class) as $reflectParam) {
            $paramName = $reflectParam->getName();
            if ($reflectParam->isVariadic() && is_array($params[$paramName])) {
                $variadicParams = array_merge($variadicParams, $params[$paramName]);
                unset($params[$paramName]);
                break; // There can only be one
            }

            if ($params[$paramName] instanceof DefaultValueParam) {
                $params[$paramName] = $params[$paramName]->getValue();
            }
        }

        return $blueprint->replaceParams(array_merge($params, array_values($variadicParams)));
    }
protected function expandParams ( Blueprint $ blueprint ) : Blueprint { $ class = $ blueprint -> getClassName ( ) ; $ params = $ blueprint -> getParams ( ) ; $ variadicParams = [ ] ; foreach ( $ this -> reflector -> getParams ( $ class ) as $ reflectParam ) { $ paramName = $ reflectParam -> getName ( ) ; if ( $ reflectParam -> isVariadic ( ) && is_array ( $ params [ $ paramName ] ) ) { $ variadicParams = array_merge ( $ variadicParams , $ params [ $ paramName ] ) ; unset ( $ params [ $ paramName ] ) ; break ; // There can only be one } if ( $ params [ $ paramName ] instanceof DefaultValueParam ) { $ params [ $ paramName ] = $ params [ $ paramName ] -> getValue ( ) ; } } return $ blueprint -> replaceParams ( array_merge ( $ params , array_values ( $ variadicParams ) ) ) ; }
Expands variadic parameters onto the end of a contructor parameters array.

@param Blueprint $blueprint The blueprint to expand parameters for.

@return Blueprint The blueprint with expanded constructor parameters.
Expands variadic parameters onto the end of a contructor parameters array .