cphalcon
cphalcon copied to clipboard
[NFR]: Change return type of `Phalcon\Collection:getIterator()` to `ArrayIterator`
Current Traversable interface does not has any methods signatures, which is not practical in terms of autocomplete of methods and for static code analysers.
https://github.com/phalcon/cphalcon/blob/645cf382358b96cbe9659f6634f41c940e89a7e4/phalcon/Collection.zep#L147
After discussion, we will make changes to this method and remove the return type. The body of the code will be a loop utilizing yield.
This is currently work in progress in Zephir.
Related (and blocker): https://github.com/zephir-lang/zephir/issues/1849