We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
getFileDocComments()
array_filter
1 parent 6d2c1ed commit 3177180Copy full SHA for 3177180
build/gen_stub.php
@@ -4770,16 +4770,10 @@ function getFileDocComments(array $stmts): array {
4770
return [];
4771
}
4772
4773
- $comments = $stmts[0]->getComments();
4774
-
4775
- $result = [];
4776
- foreach ($comments as $comment) {
4777
- if ($comment instanceof DocComment) {
4778
- $result[] = $comment;
4779
- }
4780
4781
4782
- return $result;
+ return array_filter(
+ $stmts[0]->getComments(),
+ static fn ( $comment ): bool => $comment instanceof DocComment
+ );
4783
4784
4785
function handleStatements(FileInfo $fileInfo, array $stmts, PrettyPrinterAbstract $prettyPrinter) {
0 commit comments