File tree Expand file tree Collapse file tree 1 file changed +1
-26
lines changed Expand file tree Collapse file tree 1 file changed +1
-26
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ function nowdoc(string $str): string
77
77
78
78
// take the ws from the first line and subtract them from all lines
79
79
$ matches = [];
80
- \preg_match ('/(^[ \t]+)/ ' , $ lines [0 ], $ matches );
80
+ \preg_match ('/(^[ \t]+)/ ' , $ lines [0 ] ?? '' , $ matches );
81
81
82
82
$ numLines = \count ($ lines );
83
83
for ($ i = 0 ; $ i < $ numLines ; ++$ i ) {
@@ -1010,31 +1010,6 @@ public function enterNode(Node $node)
1010
1010
*/ ' ),
1011
1011
$ addItemsToObjectShape ,
1012
1012
];
1013
- $ addCommentedItemsToMultilineObjectShape = new class extends AbstractNodeVisitor {
1014
-
1015
- public function enterNode (Node $ node )
1016
- {
1017
- if ($ node instanceof ObjectShapeNode) {
1018
- $ node = new ObjectShapeItemNode (new IdentifierTypeNode ('foo ' ), false , new IdentifierTypeNode ('int ' ));
1019
- $ node ->setAttribute (Attribute::COMMENTS , [new Comment ('// bar ' )]);
1020
- $ node ->items [] = $ node ;
1021
- }
1022
-
1023
- return $ node ;
1024
- }
1025
- };
1026
-
1027
- yield [
1028
- '/**
1029
- * @return object{}
1030
- */ ' ,
1031
- '/**
1032
- * @return object{foo: int}
1033
- */ ' ,
1034
- $ addCommentedItemsToMultilineObjectShape ,
1035
- ];
1036
-
1037
-
1038
1013
1039
1014
$ addItemsToConstExprArray = new class extends AbstractNodeVisitor {
1040
1015
You can’t perform that action at this time.
0 commit comments