From c8bfd60f52ffb6c59dddf0ca0fd85c520a765975 Mon Sep 17 00:00:00 2001 From: Sullivan SENECHAL Date: Thu, 9 Jun 2016 10:39:27 +0200 Subject: [PATCH] Fix missing Example::__toString method This method is required by the Tag interface. --- src/DocBlock/Tags/Example.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/DocBlock/Tags/Example.php b/src/DocBlock/Tags/Example.php index 922ae2f..571ef8d 100644 --- a/src/DocBlock/Tags/Example.php +++ b/src/DocBlock/Tags/Example.php @@ -134,6 +134,16 @@ final class Example extends BaseTag return $this; } + /** + * Returns a string representation for this tag. + * + * @return string + */ + public function __toString() + { + return $this->filePath . ($this->description ? ' ' . $this->description->render() : ''); + } + /** * Returns true if the provided URI is relative or contains a complete scheme (and thus is absolute). *