src/Container/Builder.php
protected static function resolve(
        ContainerInterface $container,
        array $params,
        array $map,
        bool $safe = true
    ): array {
        $args = [];
        foreach ($params as $index => $param) {
            $value = static::getParameterValue($container, $param, $index, $map, $safe);

            if ($value instanceof \Closure) {
                $value = $value($container); // unbox a boxed value
            }

            $args[] = $value; // argument resolved!
        }

        return $args;
    }
protected static function resolve(
        ContainerInterface $container,
        array $params,
        array $map,
        bool $safe = true
    ): array {
        $args = [];
        foreach ($params as $index => $param) {
            $value = static::getParameterValue($container, $param, $index, $map, $safe);

            if ($value instanceof \Closure) {
                $value = $value($container); // unbox a boxed value
            }

            $args[] = $value; // argument resolved!
        }

        return $args;
    }
protected static function resolve ( ContainerInterface $ container , array $ params , array $ map , bool $ safe = true ) : array { $ args = [ ] ; foreach ( $ params as $ index => $ param ) { $ value = static :: getParameterValue ( $ container , $ param , $ index , $ map , $ safe ) ; if ( $ value instanceof \ Closure ) { $ value = $ value ( $ container ) ; // unbox a boxed value } $ args [ ] = $ value ; // argument resolved! } return $ args ; }
Internally resolves parameters to functions or constructors.

@param ContainerInterface             $container
@param \ReflectionParameter[]|array[] $params parameter reflections
@param array                          $map    mixed list/map of parameter values (and/or boxed values)
@param bool                           $safe   if TRUE, it's considered safe to resolve against parameter names

@return array parameters

@throws \InvalidArgumentException
Internally resolves parameters to functions or constructors .