From 8ba65bc4f0c85b8af2ad7c79930303828287bbc3 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Wed, 1 Mar 2017 18:45:38 +0100 Subject: [PATCH] Don't output author email, if it doesn't exist, and add missing space. --- src/DocBlock/Tags/Author.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DocBlock/Tags/Author.php b/src/DocBlock/Tags/Author.php index 41a2788..29d7f1d 100644 --- a/src/DocBlock/Tags/Author.php +++ b/src/DocBlock/Tags/Author.php @@ -73,7 +73,7 @@ final class Author extends BaseTag implements Factory\StaticMethod */ public function __toString() { - return $this->authorName . '<' . $this->authorEmail . '>'; + return $this->authorName . (strlen($this->authorEmail) ? ' <' . $this->authorEmail . '>' : ''); } /**