public function resolveMethod(
        IContainer $container,
        $instance, $methodName,
        array $args = []
    ) {
        $class = new ReflectionClass($instance);
        $method = $class->getMethod($methodName);
        $arguments = $this->resolveMethodArguments($container, $class, $method, $args);

        if ($method->isStatic()) {
            $instance = null;
        } else if (is_string($instance)) {
            $instance = $container->get($instance);
        }

        return $method->invokeArgs($instance, $arguments);
    }
public function resolveMethod(
        IContainer $container,
        $instance, $methodName,
        array $args = []
    ) {
        $class = new ReflectionClass($instance);
        $method = $class->getMethod($methodName);
        $arguments = $this->resolveMethodArguments($container, $class, $method, $args);

        if ($method->isStatic()) {
            $instance = null;
        } else if (is_string($instance)) {
            $instance = $container->get($instance);
        }

        return $method->invokeArgs($instance, $arguments);
    }
@param IContainer $container
@param $instance
@param $methodName
@param array $args

@return mixed
@throws Exception
@throws UnresolveableArgumentException