Coduo\PHPHumanizer\String\MetricSuffix::__construct PHP Method

__construct() public method

public __construct ( $number, string $locale = 'en' )
$number
$locale string
    public function __construct($number, $locale = 'en')
    {
        if (!is_numeric($number)) {
            throw new \InvalidArgumentException('Metric suffix converter accept only numeric values.');
        }
        $this->number = (int) $number;
        $this->locale = $locale;
        /*
         * Workaround for 32-bit systems which ignore array ordering when
         * dropping values over 2^32-1
         */
        krsort($this->binaryPrefixes);
    }