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 487a697

Browse files
shmaxondrejmirtes
authored andcommitted
add test with asterisks
1 parent cbcf081 commit 487a697

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

‎tests/PHPStan/Parser/TypeParserTest.php‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -393,12 +393,7 @@ public function provideParseData(): array
393393
]),
394394
],
395395
[
396-
'array{
397-
a: int,
398-
b: array{
399-
c: callable(): int
400-
}
401-
}',
396+
'array{a: int, b: array{c: callable(): int}}',
402397
new ArrayShapeNode([
403398
new ArrayShapeItemNode(
404399
new IdentifierTypeNode('a'),
@@ -470,6 +465,18 @@ public function provideParseData(): array
470465
Lexer::TOKEN_IDENTIFIER
471466
),
472467
],
468+
[
469+
'array{
470+
* a: int
471+
*}',
472+
new ArrayShapeNode([
473+
new ArrayShapeItemNode(
474+
new IdentifierTypeNode('a'),
475+
false,
476+
new IdentifierTypeNode('int')
477+
),
478+
]),
479+
],
473480
[
474481
'callable(): Foo',
475482
new CallableTypeNode(

0 commit comments

Comments
(0)

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