public static function notSame($value, $value2, $message = '')
{
if ($value2 === $value) {
static::reportInvalidArgument(sprintf($message ?: 'Expected a value not identical to %s.', static::valueToString($value2)));
}
}
/** * {@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; }