Compare commits

..
4 Commits
2 changed files with 26 additions and 1 deletions
+17
View File
@@ -439,6 +439,23 @@ class DocBlock implements \Reflector
return $tag; return $tag;
} }
/**
* Deletes a tag from the list of tags.
*
* @param Tag $tag The tag to be deleted.
*
* @return bool True if the tag was deleted.
*/
public function deleteTag(Tag $tag)
{
if (($key = array_search($tag, $this->tags)) !== false) {
unset($this->tags[$key]);
return true;
}
return false;
}
/** /**
* Builds a string representation of this object. * Builds a string representation of this object.
@@ -76,7 +76,15 @@ class MethodTag extends ReturnTag
)? )?
# Return type # Return type
(?: (?:
([\w\|_\\\\]+) (
(?:[\w\|_\\\\]*\$this[\w\|_\\\\]*)
|
(?:
(?:[\w\|_\\\\]+)
# array notation
(?:\[\])*
)*
)
\s+ \s+
)? )?
# Legacy method name (not captured) # Legacy method name (not captured)