zend-db
zend-db copied to clipboard
HydratingResultSet current method DocBlock @return
- [X] I was not able to find an open or closed issue matching what I'm seeing.
- [X] This is not a question. (Questions should be asked on slack (Signup for Slack here) or our forums.)
HydratingResultSet current() method is specified in the DocBlock block that is should return an object as seen here:
https://github.com/zendframework/zend-db/blob/ec0e9b51a09fc44f81af77fb949808fb4552c1cf/src/ResultSet/HydratingResultSet.php#L93
The method however could also return a boolean false:
https://github.com/zendframework/zend-db/blob/ec0e9b51a09fc44f81af77fb949808fb4552c1cf/src/ResultSet/HydratingResultSet.php#L103
I am guessing that the best solution for this, as well as possibly other locations to change the boolean false to null and mark the method to return ?object instead
@twmobius It is indeed should returns null on no data for consistency I think. I created PR #325 for it.
This repository has been closed and moved to laminas/laminas-db; a new issue has been opened at https://github.com/laminas/laminas-db/issues/52.