mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Merge pull request #318 from WinterSilence/patch-3
Optimize Description::render()
This commit is contained in:
@@ -93,6 +93,10 @@ class Description
|
|||||||
*/
|
*/
|
||||||
public function render(?Formatter $formatter = null): string
|
public function render(?Formatter $formatter = null): string
|
||||||
{
|
{
|
||||||
|
if ($this->tags === []) {
|
||||||
|
return $this->bodyTemplate;
|
||||||
|
}
|
||||||
|
|
||||||
if ($formatter === null) {
|
if ($formatter === null) {
|
||||||
$formatter = new PassthroughFormatter();
|
$formatter = new PassthroughFormatter();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user