Skip to content
New issue

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

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

Already on GitHub? # to your account

Return false if collection is empty. #1725

Merged
merged 1 commit into from
Jul 17, 2014

Conversation

kayue
Copy link
Contributor

@kayue kayue commented Jul 17, 2014

Fix #1714.

pjedrzejewski pushed a commit that referenced this pull request Jul 17, 2014
Return false if collection is empty.
@pjedrzejewski pjedrzejewski merged commit e9cdc63 into Sylius:master Jul 17, 2014
@pjedrzejewski
Copy link
Member

Thanks Ka Yue!

@kayue kayue deleted the fix/issue-1714 branch July 17, 2014 13:41
@docteurklein
Copy link
Contributor

sorry to come like that :) but why ?

@docteurklein
Copy link
Contributor

it's a getter, should't it return the thing or null ? false is for boolean questions, no ?

@kayue
Copy link
Contributor Author

kayue commented Jul 17, 2014

@docteurklein because Doctrine's last() method return null. But I think what you said make sense too. @pjedrzejewski what do you think?

@docteurklein
Copy link
Contributor

sorry, I haven't read #1714 before, but my points still stands. We should have fixed doctrine, if only it wouldn't BC break :)

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

Successfully merging this pull request may close these issues.

Should getLastShipment / getLastPayment return FALSE if empty?
3 participants