diff --git a/JsonRpc2/Controller.php b/JsonRpc2/Controller.php index 1b8514c..91de207 100644 --- a/JsonRpc2/Controller.php +++ b/JsonRpc2/Controller.php @@ -316,14 +316,14 @@ private function parseMethodDocComment($method) $lines = preg_split ('/$\R?^/m', $method->getDocComment()); for ($i=0; $imethodInfo['params'][$paramMatches[2]]; $subject = $infoTpl; $subject['name'] = $paramMatches[2]; $subject['type'] = $paramMatches[1]; } else { - preg_match("/@return ([\w\\\\\[\]]+)/", $lines[$i], $paramMatches); + preg_match("/@return\s+([\w\\\\\[\]]+)/", $lines[$i], $paramMatches); if (!empty($paramMatches)) { $subject = &$this->methodInfo['return']; $subject = $infoTpl;