This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
58
{
59
9
if ($locale === null) {
60
3
$locale = $this->locale;
61
3
}
62
63
9
$formatter = new \NumberFormatter(
64
9
$locale,
65
\NumberFormatter::CURRENCY
66
9
);
67
68
9
return $formatter->formatCurrency(
69
9
$money->getConvertedAmount(),
70
9
$money->getCurrency()->getCurrencyCode()
71
9
);
72
}
73
74
/**
75
* gets currency symbol
76
*
77
* @param Money $money
78
* @return null|string
79
*/
80
6
public function formatCurrencyAsSymbol(Money $money)
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.