private static function _validateNumber($num): bool
    {
        if (is_int($num)) {
            return true;
        }
        if (is_string($num) && preg_match('/-?\d+/', $num)) {
            return true;
        }
        return false;
    }
private static function _validateNumber($num): bool
    {
        if (is_int($num)) {
            return true;
        }
        if (is_string($num) && preg_match('/-?\d+/', $num)) {
            return true;
        }
        return false;
    }
private static function _validateNumber ( $ num ) : bool { if ( is_int ( $ num ) ) { return true ; } if ( is_string ( $ num ) && preg_match ( '/-?\d+/' , $ num ) ) { return true ; } return false ; }
Test that number is valid for this context.

@param mixed $num
@return bool
Test that number is valid for this context .