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

[MoneyBundle] [CurrencyBundle] Add interface for MoneyHelper and repl… #4307

Merged
merged 1 commit into from
Mar 18, 2016

Conversation

axelvnk
Copy link

@axelvnk axelvnk commented Feb 25, 2016

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets #4305
License MIT

…ace specific typehinting to allow overrides

@michalmarcinkowski michalmarcinkowski added the DX Issues and PRs aimed at improving Developer eXperience. label Feb 25, 2016
* @throws \InvalidArgumentException
*/
public function formatAmount($amount, $currency = null, $decimal = false, $locale = null);
}
Copy link
Member

Choose a reason for hiding this comment

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

Missing blank line at the end of file ;)

@axelvnk
Copy link
Author

axelvnk commented Mar 15, 2016

@lchrusciel Hey Lukasz, i processed your comments. I also added a interface for CurrencyHelper. Would be weird if we only did the MoneyHelper and not the CurrencyHelper


/**
* Convert amount and format it!
*
Copy link
Author

Choose a reason for hiding this comment

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

I guess we could get rid of this comment since the method name already says this.

public function __construct(
CurrencyContextInterface $currencyContext,
CurrencyConverterInterface $converter,
MoneyHelperInterface $moneyHelper
Copy link
Member

Choose a reason for hiding this comment

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

Indent is too small ;)

Copy link
Member

Choose a reason for hiding this comment

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

Moreover, could you put arguments in the same order as class fields? 😄

@axelvnk
Copy link
Author

axelvnk commented Mar 17, 2016

@lchrusciel does this need anything more to get merged? Let me know.

@lchrusciel
Copy link
Member

It is good to go. Good job 👍 /cc @michalmarcinkowski

@pjedrzejewski
Copy link
Member

Before we merge that, let's quickly discuss if we want interfaces for all helpers? I would say yes.

michalmarcinkowski added a commit that referenced this pull request Mar 18, 2016
[MoneyBundle] [CurrencyBundle] Add interface for MoneyHelper and repl…
@michalmarcinkowski michalmarcinkowski merged commit f10d5c7 into Sylius:master Mar 18, 2016
@michalmarcinkowski
Copy link
Contributor

Thank you Axel! 👍

@axelvnk axelvnk deleted the issue_4305 branch March 20, 2016 22:25
pamil pushed a commit to pamil/Sylius that referenced this pull request May 7, 2019
[MoneyBundle] [CurrencyBundle] Add interface for MoneyHelper and repl…
pamil pushed a commit to pamil/Sylius that referenced this pull request May 7, 2019
[MoneyBundle] [CurrencyBundle] Add interface for MoneyHelper and repl…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX Issues and PRs aimed at improving Developer eXperience.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants