Skip to content

Commit 07b195e

Browse files
committed
Merge branch 'master' of github.com:phpDocumentor/ReflectionDocBlock
2 parents 0bca477 + 66a7d3b commit 07b195e

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/phpDocumentor/Reflection/DocBlock.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,20 +209,16 @@ protected function parseTags($tags)
209209
);
210210
}
211211
foreach (explode("\n", $tags) as $tag_line) {
212-
if (trim($tag_line) === '') {
213-
continue;
214-
}
215-
216212
if (isset($tag_line[0]) && ($tag_line[0] === '@')) {
217213
$result[] = $tag_line;
218214
} else {
219-
$result[count($result) - 1] .= PHP_EOL . $tag_line;
215+
$result[count($result) - 1] .= "\n" . $tag_line;
220216
}
221217
}
222218

223219
// create proper Tag objects
224220
foreach ($result as $key => $tag_line) {
225-
$result[$key] = Tag::createInstance($tag_line, $this);
221+
$result[$key] = Tag::createInstance(trim($tag_line), $this);
226222
}
227223
}
228224

src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function getContent()
5656
$filePath = '"' . $this->filePath . '"';
5757
}
5858

59-
$this->content = $filePath . ' ' . $this->getContent();
59+
$this->content = $filePath . ' ' . parent::getContent();
6060
}
6161

6262
return $this->content;

tests/phpDocumentor/Reflection/DocBlockTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
use phpDocumentor\Reflection\DocBlock\Context;
1616
use phpDocumentor\Reflection\DocBlock\Location;
17+
use phpDocumentor\Reflection\DocBlock\Tag\ReturnTag;
1718

1819
/**
1920
* Test class for phpDocumentor\Reflection\DocBlock
@@ -272,7 +273,10 @@ public function testParseMultilineTagWithLineBreaks()
272273
*/
273274
DOCBLOCK;
274275
$object = new DocBlock($fixture);
275-
$this->assertCount(1, $object->getTags());
276+
$this->assertCount(1, $tags = $object->getTags());
277+
/** @var ReturnTag $tag */
278+
$tag = reset($tags);
279+
$this->assertEquals("Content on\n multiple lines.\n\n One more, after the break.", $tag->getDescription());
276280
}
277281

278282
/**

0 commit comments

Comments
 (0)