src/Helper/SphericalDistance.php
public static function validateCoordinate($coordinate): bool
    {
        if (!(is_numeric($coordinate)
              && (3 >= \strlen((int) \abs($coordinate)))
              && (6 >= (\strlen($coordinate) - \strlen((int) $coordinate) - 1)))
        ) {
            return false;
        }

        return true;
    }
public static function validateCoordinate($coordinate): bool
    {
        if (!(is_numeric($coordinate)
              && (3 >= \strlen((int) \abs($coordinate)))
              && (6 >= (\strlen($coordinate) - \strlen((int) $coordinate) - 1)))
        ) {
            return false;
        }

        return true;
    }
public static function validateCoordinate ( $ coordinate ) : bool { if ( ! ( is_numeric ( $ coordinate ) && ( 3 >= \ strlen ( ( int ) \ abs ( $ coordinate ) ) ) && ( 6 >= ( \ strlen ( $ coordinate ) - \ strlen ( ( int ) $ coordinate ) - 1 ) ) ) ) { return false ; } return true ; }
Validate the coordinate.

@param string|float $coordinate The latitude or longitude coordinate.

@return bool
Validate the coordinate .