We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 592910d commit 489b48bCopy full SHA for 489b48b
1 file changed
dev/src/DocFx/Node/ParameterNode.php
@@ -129,14 +129,14 @@ private function resolveNestedType(string $name): string
129
));
130
}
131
132
- $altarray = '[]' === substr($name, -2);
133
- if ($altarray || 0 === strpos($name, 'array<')) {
+ if ('[]' === substr($name, -2)) {
+ return $this->resolveNestedType(substr($name, 0, -2)) . '[]';
134
+ }
135
+
136
+ if (0 === strpos($name, 'array<')) {
137
return preg_replace_callback(
138
'/^array<([^ ]*)>$/',
- function ($matches) use ($altarray) {
- $type = $this->resolveNestedType($matches[1]);
- return $altarray ? $type . '[]' : sprintf('array<%s>', $type);
139
- },
+ fn ($m) => sprintf('array<%s>', $this->resolveNestedType($m[1])),
140
$name
141
);
142
0 commit comments