Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ba7df7e

Browse files
Andreas Frömerondrejmirtes
Andreas Frömer
authored andcommitted
Add test for docblock parsing
1 parent c8fef04 commit ba7df7e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

‎tests/PHPStan/Parser/PhpDocParserTest.php‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3054,6 +3054,30 @@ public function provideRealWorldExampleData(): \Iterator
30543054
new PhpDocTagNode('@param', new InvalidTagValueNode('Foo::** $a', new \PHPStan\PhpDocParser\Parser\ParserException('*', Lexer::TOKEN_WILDCARD, 17, Lexer::TOKEN_VARIABLE))),
30553055
]),
30563056
];
3057+
3058+
yield [
3059+
'multiline generic types',
3060+
'/**' . PHP_EOL .
3061+
' * @implements Foo<' . PHP_EOL .
3062+
' * A, B' . PHP_EOL .
3063+
' * >' . PHP_EOL .
3064+
' */',
3065+
new PhpDocNode([
3066+
new PhpDocTagNode(
3067+
'@implements',
3068+
new ImplementsTagValueNode(
3069+
new GenericTypeNode(
3070+
new IdentifierTypeNode('Foo'),
3071+
[
3072+
new IdentifierTypeNode('A'),
3073+
new IdentifierTypeNode('B'),
3074+
]
3075+
),
3076+
''
3077+
)
3078+
),
3079+
]),
3080+
];
30573081
}
30583082

30593083
public function dataParseTagValue(): array

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /