File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -4344,13 +4344,25 @@ protected function pName_FullyQualified(Name\FullyQualified $node): string {
4344
4344
$ stmts = $ parser ->parse ($ code );
4345
4345
$ nodeTraverser ->traverse ($ stmts );
4346
4346
4347
- $ fileTags = DocCommentTag::parseDocComments (getFileDocComments ($ stmts ));
4347
+ $ fileTags = DocCommentTag::parseDocComments (self :: getFileDocComments ($ stmts ));
4348
4348
$ fileInfo = new FileInfo ($ fileTags );
4349
4349
4350
4350
$ fileInfo ->handleStatements ($ stmts , $ prettyPrinter );
4351
4351
return $ fileInfo ;
4352
4352
}
4353
4353
4354
+ /** @return DocComment[] */
4355
+ private static function getFileDocComments (array $ stmts ): array {
4356
+ if (empty ($ stmts )) {
4357
+ return [];
4358
+ }
4359
+
4360
+ return array_filter (
4361
+ $ stmts [0 ]->getComments (),
4362
+ static fn ( $ comment ): bool => $ comment instanceof DocComment
4363
+ );
4364
+ }
4365
+
4354
4366
private function handleStatements (array $ stmts , PrettyPrinterAbstract $ prettyPrinter ): void {
4355
4367
$ conds = [];
4356
4368
foreach ($ stmts as $ stmt ) {
@@ -5086,18 +5098,6 @@ function parseClass(
5086
5098
);
5087
5099
}
5088
5100
5089
- /** @return DocComment[] */
5090
- function getFileDocComments (array $ stmts ): array {
5091
- if (empty ($ stmts )) {
5092
- return [];
5093
- }
5094
-
5095
- return array_filter (
5096
- $ stmts [0 ]->getComments (),
5097
- static fn ( $ comment ): bool => $ comment instanceof DocComment
5098
- );
5099
- }
5100
-
5101
5101
/**
5102
5102
* @template T
5103
5103
* @param iterable<T> $infos
You can’t perform that action at this time.
0 commit comments