Skip to content

Commit

Permalink
Fix ordering tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Mar 9, 2017
1 parent 8cbb8ed commit f745902
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -328,14 +328,17 @@ protected function _checkDocBlock($which)

// Update tags order.
$tags = array();
$oldTags = new \ArrayIterator($docblock->getTags());
$oldTags = $docblock->getTags();
foreach (array_keys($this->_config->{$which . 'Tags'}) as $tagName) {
foreach ($oldTags as $key => $tag) {
$tmp = array();
foreach ($oldTags as $tag) {
if ($tag->getName() == $tagName) {
$tags[] = $tag;
unset($oldTags[$key]);
} else {
$tmp[] = $tag;
}
}
$oldTags = $tmp;
}
foreach ($oldTags as $key => $tag) {
$tags[] = $tag;
Expand Down

0 comments on commit f745902

Please sign in to comment.