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

[Attribute] Fix decoupling issues in AttributeBundle #3933

Merged
merged 2 commits into from
Jan 21, 2016

Conversation

Zales0123
Copy link
Member

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();

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).

Copy link
Contributor

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()), []);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@peteward
Copy link

nice 👍

@pjedrzejewski
Copy link
Member

@Zales0123 Please apply this one comment and this is good to go, nice work!

@Zales0123
Copy link
Member Author

@pjedrzejewski Done ;)

@Zales0123
Copy link
Member Author

@pjedrzejewski OK, almost done, sth is wrong with Scrutinizer, it should be restarted...

pjedrzejewski pushed a commit that referenced this pull request Jan 21, 2016
[Attribute] Fix decoupling issues in AttributeBundle
@pjedrzejewski pjedrzejewski merged commit 15399e2 into Sylius:master Jan 21, 2016
@pjedrzejewski
Copy link
Member

👍

Tetragramat pushed a commit to ThreeSixtyEu/Sylius that referenced this pull request Feb 2, 2016
@Zales0123 Zales0123 deleted the attribute-bugs-fixes branch October 28, 2016 13:46
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

Successfully merging this pull request may close these issues.

5 participants