src/Chippyash/Type/TypeFactory.php
public static function createInt($value)
    {
        if ($value instanceof NumericTypeInterface) {
            return $value->asIntType();
        }
        if (!is_numeric($value)) {
            throw new \InvalidArgumentException("'{$value}' is no valid numeric for IntType");
        }
        if (self::getRequiredType() == self::TYPE_GMP) {
            return new GMPIntType($value);
        }

        return new IntType($value);
    }
public static function createInt($value)
    {
        if ($value instanceof NumericTypeInterface) {
            return $value->asIntType();
        }
        if (!is_numeric($value)) {
            throw new \InvalidArgumentException("'{$value}' is no valid numeric for IntType");
        }
        if (self::getRequiredType() == self::TYPE_GMP) {
            return new GMPIntType($value);
        }

        return new IntType($value);
    }
public static function createInt ( $ value ) { if ( $ value instanceof NumericTypeInterface ) { return $ value -> asIntType ( ) ; } if ( ! is_numeric ( $ value ) ) { throw new \ InvalidArgumentException ( "'{$value}' is no valid numeric for IntType" ) ; } if ( self :: getRequiredType ( ) == self :: TYPE_GMP ) { return new GMPIntType ( $ value ) ; } return new IntType ( $ value ) ; }
Create an IntType

@param mixed $value
@return \Chippyash\Type\Number\IntType

@throws \InvalidArgumentException
Create an IntType