Skip to content

Commit 0f32bd0

Browse files
authored
Merge pull request #4 from liquid207/fix-annotation-error-about-typed-array
Fix annotation error about typed array like array<mixed> or array<int…
2 parents 6b69015 + b0b90f4 commit 0f32bd0

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)