Skip to content

Commit 5bb97a9

Browse files
committed
add more unit tests and normalize the "__toString" methods
-> fix code style v2
1 parent 4438ee7 commit 5bb97a9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/DocBlock/Tags/Source.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ public function __toString() : string
107107
$lineCount = $this->lineCount !== null ? '' . $this->lineCount : '';
108108

109109
return $startingLine
110-
. ($lineCount !== '' ? ($startingLine || $startingLine === '0' ? ' ' : '') . $lineCount : '')
111-
. ($description !== '' ? ($startingLine || $startingLine === '0' || $lineCount !== '' ? ' ' : '') . $description : '');
110+
. ($lineCount !== ''
111+
? ($startingLine || $startingLine === '0' ? ' ' : '') . $lineCount
112+
: '')
113+
. ($description !== ''
114+
? ($startingLine || $startingLine === '0' || $lineCount !== '' ? ' ' : '') . $description
115+
: '');
112116
}
113117
}

0 commit comments

Comments
 (0)