-
-
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
[Attribute] Fix decoupling issues in AttributeBundle #3933
Conversation
Zales0123
commented
Jan 20, 2016
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Fixed tickets | |
License | MIT |
Doc PR |
$forms = array(); | ||
|
||
$choices = ($request->query->has('sylius_product_attribute_choice')) ? $request->query->get('sylius_product_attribute_choice') : array(); | ||
$choices = ($request->query->has(sprintf('sylius_%s_choice', $this->config->getResourceName()))) ? $request->query->get(sprintf('sylius_%s_choice', $this->config->getResourceName())) : array(); |
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.
micro-optimization but you could set the string before using it twice (it will make the line shorter too).
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.
ParameterBag::get()
second argument is the default value, we can make it a lot simplier:
$config = $request->query->get(sprintf('sylius_%s_choice', $this->config->getResourceName()), []);
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.
👍
nice 👍 |
@Zales0123 Please apply this one comment and this is good to go, nice work! |
@pjedrzejewski Done ;) |
@pjedrzejewski OK, almost done, sth is wrong with Scrutinizer, it should be restarted... |
[Attribute] Fix decoupling issues in AttributeBundle
👍 |
validace a zpracovani formularu, refs Sylius#3933