/** * @param \TokenReflection\IReflectionMethod $method * @return string */ private function writeReturnType(IReflectionMethod $method) { $returnType = ''; preg_match('/\\*\\h+@return\\h+([^\\h]+)/', (string) $method->getDocComment(), $matches); if (isset($matches[1])) { $returnType = $matches[1]; if ($method->getDeclaringClass()) { $returnType = $this->expandNamespaceAlias($method->getDeclaringClass(), $returnType); } $returnType = ' : ' . $this->formatClassName($returnType); } return $returnType; }
protected function getParser() { return new CommentParser($this->reflection->getDocComment()); }