public function set($requiredType)
    {
        if (!in_array($requiredType, $this->validTypes)) {
            throw new \InvalidArgumentException("{$requiredType} is not a supported number type");
        }
        if ($requiredType == self::TYPE_GMP && !extension_loaded('gmp')) {
            throw new \InvalidArgumentException('GMP not supported');
        }

        $this->requiredType = $requiredType;

        return $this;
    }