3 comments

Hi there,

AFAIK -- nope.

https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000121970/comments/115000160010

Right now you may try something like this

Collection|int[]

Not the same for sure, but at least something

0
Avatar
Permanently deleted user

Yes, that's what I have been doing.

 

Hopefully it passes and it's supported.

0

The main major disadvantage right now is that even with Andriy's "hack", one still cannot properly document the fact that an array will have keys of a certain type - eg; there's no way to properly declared `array<string, int>` (useful, eg; if you're passing data with the key being emails, names or so).

 

By PHP's standards, right now one can see that `array` type is synonymous with `array<mixed, mixed>`... which makes this issue even more critical for simple arrays.

0

Please sign in to leave a comment.