src/BigInt.php
public static function abs($int)
    {
        if (!static::is($int)) {
            throw new \InvalidArgumentException(
                "The \$int parameter must be of type int (or string representing a big int)."
            );
        }

        if (Int::is($int)) {
            return Int::abs($int);
        } else {
            return Str::replace($int, '-', '');
        }
    }
public static function abs($int)
    {
        if (!static::is($int)) {
            throw new \InvalidArgumentException(
                "The \$int parameter must be of type int (or string representing a big int)."
            );
        }

        if (Int::is($int)) {
            return Int::abs($int);
        } else {
            return Str::replace($int, '-', '');
        }
    }
public static function abs ( $ int ) { if ( ! static :: is ( $ int ) ) { throw new \ InvalidArgumentException ( "The \$int parameter must be of type int (or string representing a big int)." ) ; } if ( Int :: is ( $ int ) ) { return Int :: abs ( $ int ) ; } else { return Str :: replace ( $ int , '-' , '' ) ; } }
Gets the absolute value of the given integer.

@param int|string $int The number to get the absolute value of.

@return int|string Returns the absolute value of the given integer.
Gets the absolute value of the given integer .