src/Number.php
protected function retrieve($number)
    {
        $dividend = 0;
        $divisor = 1;

        if ($number !== null) {
            if (is_scalar($number) && preg_match(static::NUMBER_PATTERN, $number)) {
                $dividend = (int) str_replace(".", "", $number);

                if (false !== $pos = strpos($number, ".")) {
                    $divisor = pow(10, strlen($number) - $pos - 1);
                }
            } elseif ($number instanceof $this) {
                $dividend = $number->getDividend();
                $divisor = $number->getDivisor();
            } else {
                throw new \InvalidArgumentException(
                    "The given price is not valid"
                );
            }
        }

        return array($dividend, $divisor);
    }
protected function retrieve($number)
    {
        $dividend = 0;
        $divisor = 1;

        if ($number !== null) {
            if (is_scalar($number) && preg_match(static::NUMBER_PATTERN, $number)) {
                $dividend = (int) str_replace(".", "", $number);

                if (false !== $pos = strpos($number, ".")) {
                    $divisor = pow(10, strlen($number) - $pos - 1);
                }
            } elseif ($number instanceof $this) {
                $dividend = $number->getDividend();
                $divisor = $number->getDivisor();
            } else {
                throw new \InvalidArgumentException(
                    "The given price is not valid"
                );
            }
        }

        return array($dividend, $divisor);
    }
--- Number processor ------------