Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor authored Nov 9, 2023
1 parent b1e6b32 commit 586da1e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions visitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,7 @@ public function format(int $level = 1): array

if ($this->isArrayShape()) {
if ($this->name === null) {
$strings = array_merge($strings, $childStrings);

return $strings;
return array_merge($strings, $childStrings);
}

$strings[] = sprintf(
Expand All @@ -218,7 +216,7 @@ public function format(int $level = 1): array
return $strings;
}

// Not an array with a shape
// Array without shape
$strings[] = sprintf(
'%s%s%s: array<int|string, %s{',
$padding,
Expand Down

0 comments on commit 586da1e

Please sign in to comment.