Moved formatters from Description to tags namespace because they only format a Tag now

This commit is contained in:
Mike van Riel
2015-06-14 00:02:36 +02:00
committed by Mike van Riel
parent 66c45cf480
commit 73185b45fd
7 changed files with 30 additions and 30 deletions
+7 -3
View File
@@ -12,8 +12,8 @@
namespace phpDocumentor\Reflection\DocBlock;
use phpDocumentor\Reflection\DocBlock\Description\Formatter;
use phpDocumentor\Reflection\DocBlock\Description\PassthroughFormatter;
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter;
use Webmozart\Assert\Assert;
/**
@@ -84,7 +84,11 @@ class Description
$formatter = new PassthroughFormatter();
}
return vsprintf($this->bodyTemplate, $formatter->format($this->tags));
$tags = [];
foreach ($this->tags as $tag) {
$tags[] = '{' . $formatter->format($tag) . '}';
}
return vsprintf($this->bodyTemplate, $tags);
}
/**