Skip to content

Commit

Permalink
Merge pull request #1 from digitalkaoz/patch-1
Browse files Browse the repository at this point in the history
ability to remove tags by name
  • Loading branch information
gossi committed Sep 18, 2015
2 parents 0ccb178 + 0d49f7b commit 9360d6c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Docblock.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,18 @@ public function appendTag(AbstractTag $tag) {
$this->tags->add($tag);
return $this;
}


/**
* removes tags (by tag name)
*
* @param string $tagName
*/
public function removeTags($tagName = null) {
$this->tags = $this->tags->filter(function ($tag) use ($tagName) {
return $tagName !== $tag->getTagName();
});
}

/**
* Checks whether a tag is present
*
Expand Down

0 comments on commit 9360d6c

Please sign in to comment.