public function format($value, Locale $locale, array $styleProperties = [])
{
if (isset($styleProperties[0])) {
$formatType = $styleProperties[0];
NumbersReader::validateFormatType($formatType);
} else {
$formatType = NumbersReader::FORMAT_TYPE_DECIMAL;
}
switch ($formatType) {
case NumbersReader::FORMAT_TYPE_PERCENT:
return $this->formatPercentNumber($value, $locale, NumbersReader::FORMAT_LENGTH_DEFAULT);
default:
return $this->formatDecimalNumber($value, $locale, NumbersReader::FORMAT_LENGTH_DEFAULT);
}
}