@@ -189,7 +189,7 @@ public function getValueString(mixed $value) : string
189189 /**
190190 * Format comments without indentation
191191 * @template T of \ReflectionClass
192- * @param \ReflectionMethod | \ReflectionClass<T> | null $reflection
192+ * @param \ReflectionMethod | \ReflectionClass<T> | null $reflection if \ReflectionClass, then grab the comments from the class header
193193 */
194194 protected function formatComments (?\phpDocumentor \Reflection \DocBlock $ docBlock , \ReflectionMethod | \ReflectionClass | null $ reflection = null ) : string
195195 {
@@ -285,7 +285,7 @@ protected function formatComments(?\phpDocumentor\Reflection\DocBlock $docBlock,
285285 $ body .= $ this ->getColor ('variable ' , '$ ' . $ varname ) . '' ;
286286 }
287287 }
288- $ body .= $ this ->parsedown ->html ($ description );
288+ $ body .= $ this ->parsedown ->html (\str_replace ([ ' < ' , ' > ' ], [ ' < ' , ' > ' ], $ description) );
289289 $ ul ->addItem (new \PHPFUI \ListItem ($ this ->getColor ('name ' , $ name ) . '' . $ this ->getColor ('description ' , $ body )));
290290 }
291291
@@ -420,7 +420,7 @@ protected function getHtmlClass(string $class) : string
420420
421421 /**
422422 * @template T of \ReflectionClass
423- * @param \ReflectionMethod | \ReflectionClass<T> | null $reflection
423+ * @param \ReflectionMethod | \ReflectionClass<T> | null $reflection if \ReflectionClass, then grab the comments from the class header
424424 */
425425 protected function getInheritedText (\phpDocumentor \Reflection \DocBlock $ docBlock , \ReflectionMethod | \ReflectionClass | null $ reflection = null , string $ textType = 'getDescription ' ) : string
426426 {
@@ -494,7 +494,7 @@ protected function getInheritedText(\phpDocumentor\Reflection\DocBlock $docBlock
494494 /**
495495 * @param array<int, \phpDocumentor\Reflection\DocBlock\Tag> $tags
496496 * @template T of \ReflectionClass
497- * @param \ReflectionMethod | \ReflectionClass<T> | null $reflection
497+ * @param \ReflectionMethod | \ReflectionClass<T> | null $reflection if \ReflectionClass, then grab the comments from the class header
498498 *
499499 * @return array<int, \phpDocumentor\Reflection\DocBlock\Tag>
500500 */
@@ -646,36 +646,6 @@ protected function formatAttribute(\ReflectionAttribute $attribute) : string
646646 }
647647
648648 $ targeting = '' ;
649- /*
650-
651- Not sure how useful this is, so commenting out for now.
652-
653- $target = $attribute->getTarget();
654- $targets = [];
655- $definedTargets = [
656- "CLASS" => \Attribute::TARGET_CLASS,
657- "FUNCTION" => \Attribute::TARGET_FUNCTION,
658- "METHOD" => \Attribute::TARGET_METHOD,
659- "PROPERTY" => \Attribute::TARGET_PROPERTY,
660- "CLASS_CONSTANT" => \Attribute::TARGET_CLASS_CONSTANT,
661- "PARAMETER" => \Attribute::TARGET_PARAMETER,
662- ];
663- foreach ($definedTargets as $name => $value)
664- {
665- if ($target & $value)
666- {
667- $targets[] = '\\Attribute::TARGET_' . $name;
668- }
669- }
670- if ($attribute->isRepeated())
671- {
672- $targets[] = '\\Attribute::IS_REPEATABLE';
673- }
674- if ($targets)
675- {
676- $targeting = ' ' . implode(' | ', $targets);
677- }
678- */
679649
680650 return $ this ->getClassName ($ attribute ->getName ()) . $ parameters . $ targeting ;
681651 }
0 commit comments