From 85c31e4bb1ee1a825bdf099494e90a439caae670 Mon Sep 17 00:00:00 2001 From: markhuot Date: Mon, 30 Sep 2024 12:37:38 -0400 Subject: [PATCH] phpstan adjustment --- src/bin/generate-docs.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/generate-docs.php b/src/bin/generate-docs.php index 108e01c..0554620 100644 --- a/src/bin/generate-docs.php +++ b/src/bin/generate-docs.php @@ -59,7 +59,7 @@ function parseClass(string $className) function parseComment(string $comment) { preg_match_all('/@see\s+(.+)$/m', $comment, $sees); - foreach (($sees[1] ?? []) as $index => $otherClass) { + foreach ($sees[1] as $index => $otherClass) { $comment = str_replace($sees[0][$index], 'SEE['.$otherClass.']', $comment); } @@ -71,7 +71,7 @@ function parseComment(string $comment) $comment = preg_replace('/(^\s+|\s+$)/', '', $comment); preg_match_all('/^SEE\[(.+)\]$/m', $comment, $sees); - foreach (($sees[1] ?? []) as $index => $otherClass) { + foreach ($sees[1] as $index => $otherClass) { $comment = str_replace($sees[0][$index], "\n\n".implode("\n\n", parseClass($otherClass))."\n\n", $comment); }