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

[Core] Rewrite ChannelBasedCurrencyProvider #5647

Merged

Conversation

pamil
Copy link
Contributor

@pamil pamil commented Jul 29, 2016

There's no reason not to use map on Collection instead of array_map on array (nice chaining included).

@pjedrzejewski pjedrzejewski merged commit 080b229 into Sylius:master Jul 29, 2016
@pjedrzejewski
Copy link
Member

👍

@pamil pamil deleted the context/channel-based-currency-provider-fix branch July 29, 2016 20:10
->getCurrencies()
->filter(function (CurrencyInterface $currency) {
return $currency->isEnabled();
})
->map(function (CurrencyInterface $currency) {
return $currency->getCode();
})
->toArray()
Copy link
Contributor

Choose a reason for hiding this comment

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

Debugging such chains is not easy 🏃💥 💣

pamil pushed a commit to pamil/Sylius that referenced this pull request May 7, 2019
…ncy-provider-fix

[Core] Rewrite ChannelBasedCurrencyProvider
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.

None yet

3 participants