ENXF NET
Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
- Joined
- Nov 13, 2018
- Messages
- 26,577
- Points
- 823
Reputation:
These collection classes result in entity property type hints of;
PHP:
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
It would be nice if this was;
PHP:
Thankfully via phpdocs we can do this:
PHP:
Read more
Continue reading...
PHP:
Code:
/**
* @property-read \MyAddon\Entity\Foo[]|\XF\Mvc\Entity\AbstractCollection
*/
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
Continue reading...