private static function isValidUri(array $uri): bool
    {
        if (!self::isValidUriScheme($uri['scheme'])) {
            return false;
        }
        if (!self::isValidUriPath($uri['path'])) {
            return false;
        }
        if (!self::isValidUriQuery($uri['query'])) {
            return false;
        }
        if (!self::isValidUriFragment($uri['fragment'])) {
            return false;
        }
        if (!self::isValidUriAuthority($uri['authority'])) {
            return false;
        }

        return true;
    }
private static function isValidUri(array $uri): bool
    {
        if (!self::isValidUriScheme($uri['scheme'])) {
            return false;
        }
        if (!self::isValidUriPath($uri['path'])) {
            return false;
        }
        if (!self::isValidUriQuery($uri['query'])) {
            return false;
        }
        if (!self::isValidUriFragment($uri['fragment'])) {
            return false;
        }
        if (!self::isValidUriAuthority($uri['authority'])) {
            return false;
        }

        return true;
    }
private static function isValidUri ( array $ uri ) : bool { if ( ! self :: isValidUriScheme ( $ uri [ 'scheme' ] ) ) { return false ; } if ( ! self :: isValidUriPath ( $ uri [ 'path' ] ) ) { return false ; } if ( ! self :: isValidUriQuery ( $ uri [ 'query' ] ) ) { return false ; } if ( ! self :: isValidUriFragment ( $ uri [ 'fragment' ] ) ) { return false ; } if ( ! self :: isValidUriAuthority ( $ uri [ 'authority' ] ) ) { return false ; } return true ; }
Checks if URI components are valid

@param array $uri an associated array of URI components

@return bool
Checks if URI components are valid