Fix annotation error about typed array like array<mixed> or array<int> ...

This commit is contained in:
Shuai Yang
2020-01-08 15:09:57 +08:00
parent 6b69015d83
commit b0b90f44f0
@@ -151,6 +151,10 @@ class Collection extends \ArrayObject
return '';
}
if (substr($type, 0, 6) === 'array<' && substr($type, -1) === '>') {
return $type;
}
if ($this->isTypeAnArray($type)) {
return $this->expand(substr($type, 0, -2)) . self::OPERATOR_ARRAY;
}