Reliable type hinting when using AbstractCollection/ArrayCollection/FinderCollection collections

X

Xon

Guest
Member
These collection classes result in entity property type hints of;
PHP:

Code:
/**
  * @property-read \MyAddon\Entity\Foo[]|\XF\Mvc\Entity\AbstractCollection
  */
This has edge cases where the exact return type doesn't really match and iterating can lose the proper type hint. Especially if calling methods on AbstractCollection

It would be nice if this was;
PHP:

Code:
/**
  * @property-read \XF\Mvc\Entity\AbstractCollection<\MyAddon\Entity\Foo>
  */

Thankfully via phpdocs we can do this:

PHP:

/**...

Read more
Reliable type hinting when using AbstractCollection/ArrayCollection/FinderCollection collections

free plugins
minecraft paid for free
mcmarket
mc-market
free minecraft paid plugins
free minecraft plugins
spigotmc
SpigotMC
aac free
ewg free
Minecraft Premium Plugins
ewg free download
litebans free
epicworldgenerator free
free schematics
leaked schematics minecraft
schematics
schematics leaked
schematics free
minecraft schematics free
paid minecraft schematics free
paid minecraft schematics for free
free cracked plugins
free cracked minecraft plugins
plugins
featherboard download
featherboard plugin download
antiaura download
xenforo leaked
xenforo for free
xenforo addons
 
BlackSpigot General Chat
Rules Help Users
    jimmynoob1234 @ jimmynoob1234: need help
    Top