Skip to content

Commit 647571f

Browse files
authored
Merge pull request #318 from WinterSilence/patch-3
Optimize Description::render()
2 parents 7769e9e + e3d6818 commit 647571f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/DocBlock/Description.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ public function getTags(): array
9393
*/
9494
public function render(?Formatter $formatter = null): string
9595
{
96+
if ($this->tags === []) {
97+
return $this->bodyTemplate;
98+
}
99+
96100
if ($formatter === null) {
97101
$formatter = new PassthroughFormatter();
98102
}

0 commit comments

Comments
 (0)