/**
* {@inheritdoc}
*/
public function format($amount, $currency, $locale = 'en')
{
$formatter = new \NumberFormatter($locale, \NumberFormatter::CURRENCY);
$result = $formatter->formatCurrency($amount / 100, $currency);
Assert::notSame(false, $result, sprintf('The amount "%s" of type %s cannot be formatted to currency "%s".', $amount, gettype($amount), $currency));
return $result;
}