File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ public function getTypeAliasImportTagValues(string $tagName = '@phpstan-import-t
271271
272272 public function __toString (): string
273273 {
274- return "/** \n * " . implode ("\n * " , $ this ->children ) . ' */ ' ;
274+ return "/** \n * " . implode ("\n * " , $ this ->children ) . "\n */ " ;
275275 }
276276
277277}
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types = 1 );
2+
3+ namespace PHPStan \PhpDocParser \Ast \PhpDoc ;
4+
5+ use PHPStan \PhpDocParser \Ast \Node ;
6+ use PHPUnit \Framework \TestCase ;
7+
8+ final class NodePrintTest extends TestCase
9+ {
10+
11+ /**
12+ * @dataProvider providePhpDocData
13+ */
14+ public function testPrintMultiline (Node $ node , string $ expectedPrinted ): void
15+ {
16+ $ this ->assertSame ($ expectedPrinted , (string ) $ node );
17+ }
18+
19+
20+ public function providePhpDocData (): \Iterator
21+ {
22+ yield [
23+ new PhpDocNode ([
24+ new PhpDocTextNode ('It works ' ),
25+ ]),
26+ '/**
27+ * It works
28+ */ ' ,
29+ ];
30+ }
31+
32+ }
You can’t perform that action at this time.
0 commit comments