Merge pull request #318 from WinterSilence/patch-3

Optimize Description::render()
This commit is contained in:
Jaap van Otterdijk
2021-12-20 08:08:37 +01:00
committed by GitHub
+4
View File
@@ -93,6 +93,10 @@ class Description
*/
public function render(?Formatter $formatter = null): string
{
if ($this->tags === []) {
return $this->bodyTemplate;
}
if ($formatter === null) {
$formatter = new PassthroughFormatter();
}