Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

HydratingResultSet current method DocBlock @return #316

Open
2 tasks done
twmobius opened this issue May 10, 2018 · 2 comments
Open
2 tasks done

HydratingResultSet current method DocBlock @return #316

twmobius opened this issue May 10, 2018 · 2 comments

Comments

@twmobius
Copy link

twmobius commented May 10, 2018

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 twmobius changed the title HydratingResultSet current method PhpDoc @return HydratingResultSet current method DocBlock @return May 10, 2018
samsonasik added a commit to samsonasik/zend-db that referenced this issue Jul 3, 2018
@samsonasik
Copy link
Contributor

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

@michalbundyra
Copy link
Member

This repository has been closed and moved to laminas/laminas-db; a new issue has been opened at laminas/laminas-db#52.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants