Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HydratingResultSet current method DocBlock @return #52

Closed
2 tasks done
michalbundyra opened this issue Jan 16, 2020 · 2 comments
Closed
2 tasks done

HydratingResultSet current method DocBlock @return #52

michalbundyra opened this issue Jan 16, 2020 · 2 comments

Comments

@michalbundyra
Copy link
Member

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


Originally posted by @twmobius at zendframework/zend-db#316

@michalbundyra
Copy link
Member Author

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


Originally posted by @samsonasik at zendframework/zend-db#316 (comment)

@samsonasik
Copy link
Member

already fixed by #39 . I am closing it.

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

No branches or pull requests

2 participants