for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Assimtech\Money;
use Symfony\Component\Intl\Intl;
class Currency
{
/**
* @var string $code ISO 4217 alpha3 currency code
*/
private $code;
* @var integer $fractionDigits
private $fractionDigits;
* @param string $code ISO 4217 alpha3 currency code
public function __construct($code)
$this->code = $code;
$this->fractionDigits = Intl::getCurrencyBundle()->getFractionDigits($code);
}
* @return string
public function __toString()
return $this->code;
public function getCode()
* @return integer
public function getFractionDigits()
return $this->fractionDigits;