Add support array of type expression in phpdoc
More info in phpdoc docuemntation:
https://docs.phpdoc.org/references/phpdoc/types.html
example:
/**
* @return (int|string)[]
*/
function foo(){
return [1,'bar'];
}
ABNF:
type-expression = 1*(array-of-type-expression|array-of-type|type ["|"]) array-of-type-expression = "(" type-expression ")[]" array-of-type = type "[]" type = class-name|keyword class-name = 1*CHAR keyword = "string"|"integer"|"int"|"boolean"|"bool"|"float" |"double"|"object"|"mixed"|"array"|"resource" |"void"|"null"|"callback"|"false"|"true"|"self"
Please sign in to leave a comment.
Issues to vote for:
https://youtrack.jetbrains.com/issue/WI-39419
https://youtrack.jetbrains.com/issue/WI-6558
https://youtrack.jetbrains.com/issue/WI-43843 (a bit different, but still)