/** * {@inheritdoc} * **/ public function make($value, $type, $decimals = 2, $symbol = true) { $type = strtoupper($type); $typedata = Type::getTypeData($type); $dec_point = $typedata['decimal_mark']; $thousands_sep = $typedata['thousand_marker']; $format = number_format($value, $decimals, $dec_point, $thousands_sep); $this->value = str_replace('{value}', $format, $typedata['format']); if ($symbol === false) { $this->value = str_replace($typedata['symbol'], '', $this->value); } return $this->value; }
/** * @expectedException \Hexcores\Currency\Exceptions\NotSupportedTypeException */ public function testNotSupportedTypeException() { Type::getTypeData("RUH"); }