-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Remove old closures compatibility code #3347
Conversation
stloyd
commented
Sep 24, 2015
Q | A |
---|---|
Bug fix? | no |
BC breaks? | no |
License | MIT |
b076bca
to
0f7f56a
Compare
->validate(function () use ($cart) { | ||
return !$cart->isEmpty(); | ||
->validate(function () { | ||
return !$this->cartProvider->getCart()->isEmpty(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not $this->getCurrentCart()->isEmpty()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH. I was not sure about this, and decided to not use protected method but direct call, can change if it's a problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for $this->getCurrentCart()->isEmpty()
for the sake of code readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
👍 |
1 similar comment
👍 |
0f7f56a
to
7a0ca54
Compare
@pjedrzejewski ping :) |
Remove old closures compatibility code
Thank you Joseph! |
Remove old closures compatibility code
Remove old closures compatibility code
Remove old closures compatibility code
Remove old closures compatibility code