zend-db icon indicating copy to clipboard operation
zend-db copied to clipboard

HydratingResultSet current method DocBlock @return

Open twmobius opened this issue 7 years ago • 2 comments

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 avatar May 10 '18 08:05 twmobius

@twmobius It is indeed should returns null on no data for consistency I think. I created PR #325 for it.

samsonasik avatar Jul 03 '18 01:07 samsonasik

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.

michalbundyra avatar Jan 16 '20 19:01 michalbundyra