code: 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);
      }
docs: @param IContainer $container
  @param $instance
  @param $methodName
  @param array $args
  
  @return mixed
  @throws Exception
  @throws UnresolveableArgumentException