Skip to content

Commit

Permalink
Trim leading forward slashes from class names
Browse files Browse the repository at this point in the history
  • Loading branch information
donatj committed Aug 21, 2024
1 parent f877e4b commit c216678
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Documentation/PhpFileDocs.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private function scanSourceFile( string $filename, int $depth ) {
if( $class = $reflector->getReflector() ) {

if( !$this->getOption(self::OPT_SKIP_CLASS_HEADER, true) ) {
$document->appendChild(new Header('Class: ' . $class->getFqsen() /* . ' \\[ ', new Code('\\' . $class->getNamespace()), ' \\]' */));
$document->appendChild(new Header('Class: ' . ltrim($class->getFqsen(), "\\") /* . ' \\[ ', new Code('\\' . $class->getNamespace()), ' \\]' */));

if( $classBlock = $class->getDocBlock() ) {
if( $this->shouldSkip($classBlock) ) {
Expand Down

0 comments on commit c216678

Please sign in to comment.