Skip to content

Commit

Permalink
phpstan adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
markhuot committed Sep 30, 2024
1 parent e93c34e commit 85c31e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bin/generate-docs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down

0 comments on commit 85c31e4

Please sign in to comment.