Optimize Description::render()

This commit is contained in:
Anton
2021-12-18 21:35:58 +03:00
committed by GitHub
parent 622548b623
commit e3d6818033
+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();
}