zendframework/zend-db

HydratingResultSet current method DocBlock @return

Opened this issue · 2 comments

HydratingResultSet current() method is specified in the DocBlock block that is should return an object as seen here:

The method however could also return a boolean false:

$object = is_array($data) ? $this->hydrator->hydrate($data, clone $this->objectPrototype) : false;

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 laminas/laminas-db#52.