protected function resolveParameters(
        $class,
        array $unresolvedParameters,
        array $primitives
    ) : array {
        $resolvedParameters = [];

        foreach ($unresolvedParameters as $parameter) {
            $resolvedParameter = null;

            if ($parameter->getClass() === null) {
                // The parameter is a primitive
                $resolvedParameter = $this->resolvePrimitive($parameter, $primitives);
            } else {
                // The parameter is an object
                $parameterClassName = $parameter->getClass()->getName();

                /**
                 * We need to first check if the input class is a target for the parameter
                 * If it is, resolve it using the input class as a target
                 * Otherwise, attempt to resolve it universally
                 */
                if ($class !== null && $this->hasTargetedBinding($parameterClassName, $class)) {
                    $resolvedParameter = $this->for($class, function (IContainer $container) use ($parameter) {
                        return $container->resolve($parameter->getClass()->getName());
                    });
                } else {
                    $resolvedParameter = $this->resolve($parameterClassName);
                }
            }

            $resolvedParameters[] = $resolvedParameter;
        }

        return $resolvedParameters;
    }