Lack of interest ArrayCollection should implement empty

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

Sim

Well-known member
It would be handy if we had an easy (or at least easier) way of testing for an empty collection in XF\Mvc\Entity\ArrayCollection.

I know we could do if (count($collection) == 0) ... but I think it would be cleaner and more consistent if we could do if ($collection->empty()) (given that we can't do if (empty($collection)) ... unless that could be implemented somehow instead which would be really cool?)
 
Last edited:
Upvote 6
This suggestion has been closed. Votes are no longer accepted.
Top Bottom