protected function getPhpdoc($method)
    {

        $reflect = false;
        
        foreach($this->served_classes as $class){
            if (\method_exists($class, $method)) {
                $reflect = new \ReflectionMethod($class, $method);
                break;
            }
        
        }
        
        $response = new \stdClass();
        
         if(!$reflect){
            $response->error = new \sb\JSON\RPC2\Error();
            $response->error->code = -32602;
            $response->error->message = "Invalid method parameters";
            return $response;
        }

        $response->phpdoc = $reflect->getDocComment();

        if (\preg_match("~@return (.*?) (.*?)\*/$~s", $response->phpdoc, $match)) {
            $response->return_type = $match[1];
        } else {
            $response->return_type = 'n/a';
        }

        return $response;
    }