mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-17 17:47:13 +00:00
Optimize Description::render()
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user