From 973ce24f9c1e9837a51b70fd4dafaf14871072ec Mon Sep 17 00:00:00 2001 From: Moshe Weitzman Date: Sun, 24 Dec 2023 09:28:09 -0500 Subject: [PATCH] Avoid infinite loop in \Consolidation\AnnotatedCommand\Parser\CommandInfo::getName (#306) --- src/Parser/CommandInfo.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Parser/CommandInfo.php b/src/Parser/CommandInfo.php index 60a700a..8042bd9 100644 --- a/src/Parser/CommandInfo.php +++ b/src/Parser/CommandInfo.php @@ -183,7 +183,9 @@ public function getMethodName() */ public function getName() { - $this->parseDocBlock(); + if (empty($this->name)) { + $this->parseDocBlock(); + } return $this->name; }