From 5bb97a97c001ca2c6f661e0a0e86005ad5bedaaa Mon Sep 17 00:00:00 2001 From: Lars Moelleken Date: Thu, 3 Sep 2020 02:51:17 +0200 Subject: [PATCH] add more unit tests and normalize the "__toString" methods -> fix code style v2 --- src/DocBlock/Tags/Source.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/DocBlock/Tags/Source.php b/src/DocBlock/Tags/Source.php index ee12357..f0c3101 100644 --- a/src/DocBlock/Tags/Source.php +++ b/src/DocBlock/Tags/Source.php @@ -107,7 +107,11 @@ final class Source extends BaseTag implements Factory\StaticMethod $lineCount = $this->lineCount !== null ? '' . $this->lineCount : ''; return $startingLine - . ($lineCount !== '' ? ($startingLine || $startingLine === '0' ? ' ' : '') . $lineCount : '') - . ($description !== '' ? ($startingLine || $startingLine === '0' || $lineCount !== '' ? ' ' : '') . $description : ''); + . ($lineCount !== '' + ? ($startingLine || $startingLine === '0' ? ' ' : '') . $lineCount + : '') + . ($description !== '' + ? ($startingLine || $startingLine === '0' || $lineCount !== '' ? ' ' : '') . $description + : ''); } }