File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
src/phpDocumentor/Reflection
tests/phpDocumentor/Reflection Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -209,20 +209,16 @@ protected function parseTags($tags)
209
209
);
210
210
}
211
211
foreach (explode ("\n" , $ tags ) as $ tag_line ) {
212
- if (trim ($ tag_line ) === '' ) {
213
- continue ;
214
- }
215
-
216
212
if (isset ($ tag_line [0 ]) && ($ tag_line [0 ] === '@ ' )) {
217
213
$ result [] = $ tag_line ;
218
214
} else {
219
- $ result [count ($ result ) - 1 ] .= PHP_EOL . $ tag_line ;
215
+ $ result [count ($ result ) - 1 ] .= "\n" . $ tag_line ;
220
216
}
221
217
}
222
218
223
219
// create proper Tag objects
224
220
foreach ($ result as $ key => $ tag_line ) {
225
- $ result [$ key ] = Tag::createInstance ($ tag_line , $ this );
221
+ $ result [$ key ] = Tag::createInstance (trim ( $ tag_line) , $ this );
226
222
}
227
223
}
228
224
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public function getContent()
56
56
$ filePath = '" ' . $ this ->filePath . '" ' ;
57
57
}
58
58
59
- $ this ->content = $ filePath . ' ' . $ this -> getContent ();
59
+ $ this ->content = $ filePath . ' ' . parent :: getContent ();
60
60
}
61
61
62
62
return $ this ->content ;
Original file line number Diff line number Diff line change 14
14
15
15
use phpDocumentor \Reflection \DocBlock \Context ;
16
16
use phpDocumentor \Reflection \DocBlock \Location ;
17
+ use phpDocumentor \Reflection \DocBlock \Tag \ReturnTag ;
17
18
18
19
/**
19
20
* Test class for phpDocumentor\Reflection\DocBlock
@@ -272,7 +273,10 @@ public function testParseMultilineTagWithLineBreaks()
272
273
*/
273
274
DOCBLOCK ;
274
275
$ 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 ());
276
280
}
277
281
278
282
/**
You can’t perform that action at this time.
0 commit comments