Skip to content

Commit

Permalink
Object shapes - test without space after colon
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Apr 6, 2023
1 parent 882eabc commit bada68a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/PHPStan/Parser/TypeParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,21 @@ public function provideParseData(): array
'int|object{}',
new UnionTypeNode([new IdentifierTypeNode('int'), new ObjectShapeNode([])]),
],
[
'object{attribute:string, value?:string}',
new ObjectShapeNode([
new ObjectShapeItemNode(
new IdentifierTypeNode('attribute'),
false,
new IdentifierTypeNode('string')
),
new ObjectShapeItemNode(
new IdentifierTypeNode('value'),
true,
new IdentifierTypeNode('string')
),
]),
],
];
}

Expand Down

0 comments on commit bada68a

Please sign in to comment.