Skip to content

Commit dc7d72e

Browse files
authored
Merge pull request #288 from jrfnl/feature/docblock-source-phpstan-fix
DocBlock/Tags/Source: remove redundant code
2 parents 9381f67 + fcb8fe6 commit dc7d72e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/DocBlock/Tags/Source.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,12 @@ public function __toString() : string
104104

105105
$startingLine = (string) $this->startingLine;
106106

107-
$lineCount = $this->lineCount !== null ? '' . $this->lineCount : '';
107+
$lineCount = $this->lineCount !== null ? ' ' . $this->lineCount : '';
108108

109109
return $startingLine
110-
. ($lineCount !== ''
111-
? ($startingLine || $startingLine === '0' ? ' ' : '') . $lineCount
112-
: '')
110+
. $lineCount
113111
. ($description !== ''
114-
? ($startingLine || $startingLine === '0' || $lineCount !== '' ? ' ' : '') . $description
112+
? ' ' . $description
115113
: '');
116114
}
117115
}

0 commit comments

Comments
 (0)