Skip to content

Commit b0b90f4

Browse files
author
Shuai Yang
committed
Fix annotation error about typed array like array<mixed> or array<int> ...
1 parent 6b69015 commit b0b90f4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Barryvdh/Reflection/DocBlock/Type/Collection.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ protected function expand($type)
151151
return '';
152152
}
153153

154+
if (substr($type, 0, 6) === 'array<' && substr($type, -1) === '>') {
155+
return $type;
156+
}
157+
154158
if ($this->isTypeAnArray($type)) {
155159
return $this->expand(substr($type, 0, -2)) . self::OPERATOR_ARRAY;
156160
}

0 commit comments

Comments
 (0)