Compare commits

..
3 Commits
Author SHA1 Message Date
Mike van Riel 60ba10fad1 Multiline @return statements were stripped from their newlines and indent
@return statements (and effectively others) were stripped from their newlines
and indentation. By tweaking the reflection a bit was this effect countered.
2012-09-10 16:50:44 +02:00
Mike van Riel 91ef535ae3 #544: Added self and $this to the exceptions where type expansion is not required 2012-07-27 06:56:37 +02:00
Mike van Riel c999e7d32a Removed the prefixing slash in a class_exists call because the autoloader of Composer
dies on that occasionally.
2012-07-26 17:09:50 +02:00
3 changed files with 4 additions and 5 deletions
+1 -3
View File
@@ -199,8 +199,6 @@ class DocBlock implements \Reflector
continue; continue;
} }
$tag_line = ltrim($tag_line);
if (isset($tag_line[0]) && ($tag_line[0] === '@')) { if (isset($tag_line[0]) && ($tag_line[0] === '@')) {
$result[] = $tag_line; $result[] = $tag_line;
} else { } else {
@@ -325,7 +323,7 @@ class DocBlock implements \Reflector
$ignore_keywords = array( $ignore_keywords = array(
'string', 'int', 'integer', 'bool', 'boolean', 'float', 'double', 'string', 'int', 'integer', 'bool', 'boolean', 'float', 'double',
'object', 'mixed', 'array', 'resource', 'void', 'null', 'object', 'mixed', 'array', 'resource', 'void', 'null',
'callback', 'false', 'true' 'callback', 'false', 'true', 'self', '$this', 'callable'
); );
} }
@@ -78,7 +78,7 @@ class LongDescription implements \Reflector
); );
} }
if (class_exists('\dflydev\markdown\MarkdownExtraParser')) { if (class_exists('dflydev\markdown\MarkdownExtraParser')) {
$md = new \dflydev\markdown\MarkdownExtraParser(); $md = new \dflydev\markdown\MarkdownExtraParser();
$result = $md->transformMarkdown($result); $result = $md->transformMarkdown($result);
} }
@@ -34,7 +34,8 @@ class ReturnTag extends ParamTag
{ {
$this->tag = $type; $this->tag = $type;
$this->content = $content; $this->content = $content;
$content = preg_split('/\s+/u', $content);
$content = preg_split('/[\ \t]+/u', $content, 2);
// any output is considered a type // any output is considered a type
$this->type = array_shift($content); $this->type = array_shift($content);