protected function resolveCallableArguments(\ReflectionFunctionAbstract $reflector, $args = [])
    {
        return array_map(
            function (\ReflectionParameter $parameter) use ($args) {
                $name  = $parameter->name;
                $class = $parameter->getClass();

                if ( array_key_exists($name, $args) ) {
                    return $args[ $name ];
                }

                if ( $class ) {
                    return $this->get($class->name);
                }

                if ( $parameter->isDefaultValueAvailable() ) {
                    return $parameter->getDefaultValue();
                }

                throw new \RuntimeException(
                    sprintf(
                        'Cannot resolve argument [%s], it should be provided within an array of arguments passed to ' .
                        '[%s::call], have a default value or be type hinted',
                        $name,
                        get_class($this)
                    )
                );
            },
            $reflector->getParameters()
        );
    }