diff --git a/lib/Sphpdox/Element/ClassElement.php b/lib/Sphpdox/Element/ClassElement.php index 398a466..858e9bb 100644 --- a/lib/Sphpdox/Element/ClassElement.php +++ b/lib/Sphpdox/Element/ClassElement.php @@ -57,7 +57,15 @@ public function __toString() $string .= $title . "\n"; $string .= str_repeat('-', strlen($title)) . "\n\n"; $string .= $this->getNamespaceElement(); - $string .= '.. php:class:: ' . $this->reflection->getShortName(); + + if ($this->reflection->isInterface()){ + $string .= '.. php:interface:: ' ; + } elseif ($this->reflection->isTrait()){ + $string .= '.. php:trait:: ' ; + } else { + $string .= '.. php:class:: ' ; + } + $string .= $this->reflection->getShortName(); $parser = $this->getParser();