We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e0ad3a commit 414daf3Copy full SHA for 414daf3
tests/PHPStan/Parser/TypeParserTest.php
@@ -393,12 +393,7 @@ public function provideParseData(): array
393
]),
394
],
395
[
396
- 'array{
397
- a: int,
398
- b: array{
399
- c: callable(): int
400
- }
401
- }',
+ 'array{a: int, b: array{c: callable(): int}}',
402
new ArrayShapeNode([
403
new ArrayShapeItemNode(
404
new IdentifierTypeNode('a'),
@@ -470,6 +465,18 @@ public function provideParseData(): array
470
465
Lexer::TOKEN_IDENTIFIER
471
466
),
472
467
468
+ [
469
+ 'array{
+ * a: int
+ *}',
+ new ArrayShapeNode([
473
+ new ArrayShapeItemNode(
474
+ new IdentifierTypeNode('a'),
475
+ false,
476
+ new IdentifierTypeNode('int')
477
+ ),
478
+ ]),
479
+ ],
480
481
'callable(): Foo',
482
new CallableTypeNode(
0 commit comments