File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1586,7 +1586,7 @@ public function toPhpDocNode(): TypeNode
1586
1586
1587
1587
public static function isValidIdentifier (string $ value ): bool
1588
1588
{
1589
- $ result = Strings::match ($ value , '~(?:[ \\\\]?+[a-z_ \\x80- \\xFF][0-9a-z_ \\x80- \\xFF-]*+)++~Asi ' );
1589
+ $ result = Strings::match ($ value , '~^ (?:[ \\\\]?+[a-z_ \\x80- \\xFF][0-9a-z_ \\x80- \\xFF-]*+)++$~si ' );
1590
1590
1591
1591
return $ result !== null ;
1592
1592
}
Original file line number Diff line number Diff line change @@ -73,6 +73,15 @@ public function dataToPhpDocNode(): iterable
73
73
"array{'1100-RB': 1} " ,
74
74
];
75
75
76
+ yield [
77
+ new ConstantArrayType ([
78
+ new ConstantStringType ('Karlovy Vary ' ),
79
+ ], [
80
+ new ConstantIntegerType (1 ),
81
+ ], [0 ]),
82
+ "array{'Karlovy Vary': 1} " ,
83
+ ];
84
+
76
85
yield [
77
86
new ObjectShapeType ([
78
87
'1100-RB ' => new ConstantIntegerType (1 ),
You can’t perform that action at this time.
0 commit comments