figured with the $flags parameter.
*
* PSR-7 UriInterface cannot distinguish between an empty component and a missing component as
* getQuery(), getFragment() etc. always return a string. This means the URIs "/?#" and "/" are
* treated equivalent which is not necessarily true according to RFC 3986. But that difference
* is highly uncommon in reality. So this potential normalization is implied in PSR-7 as well.
*
* @param UriInterface $uri The URI to normalize
* @param int $flags A bitmask of normalizations to apply, see constants
*
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.2
*/
public static function normalize(\YoastSEO_Vendor\Psr\Http\Message\UriInterface $uri, int $flags = self::PRESERVING_NORMALIZATIONS) : \YoastSEO_Vendor\Psr\Http\Message\UriInterface
{
if ($flags & self::CAPITALIZE_PERCENT_ENCODING) {
$uri = self::capitalizePercentEncoding($uri);
}
if ($flags & self::DECODE_UNRESERVED_CHARACTERS) {
$uri = self::decodeUnreservedCharacters($uri);
}
if ($flags & self::CONVERT_EMPTY_PATH && $uri->getPath() === '' && ($uri->getScheme() === 'http' || $uri->getScheme() === 'https')) {
$uri = $uri->withPath('/');
}
if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') {
$uri = $uri->withHost('');
}
if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && \YoastSEO_Vendor\GuzzleHttp\Psr7\Uri::isDefaultPort($uri)) {
$uri = $uri->withPort(null);
}
if ($flags & self::REMOVE_DOT_SEGMENTS && !\YoastSEO_Vendor\GuzzleHttp\Psr7\Uri::isRelativePathReference($uri)) {
$uri = $uri->withPath(\YoastSEO_Vendor\GuzzleHttp\Psr7\UriResolver::removeDotSegments($uri->getPath()));
}
if ($flags & self::REMOVE_DUPLICATE_SLASHES) {
$uri = $uri->withPath(\preg_replace('#//++#', '/', $uri->getPath()));
}
if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') {
$queryKeyValues = \explode('&', $uri->getQuery());
\sort($queryKeyValues);
$uri = $uri->withQuery(\implode('&', $queryKeyValues));
}
return $uri;
}
/**
* Whether two URIs can be considered equivalent.
*
* Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also
* accepts relative URI references and returns true when they are equivalent. This of course assumes they will be
* resolved against the same base URI. If this is not the case, determination of equivalence or difference of
* relative references does not mean anything.
*
* @param UriInterface $uri1 An URI to compare
* @param UriInterface $uri2 An URI to compare
* @param int $normalizations A bitmask of normalizations to apply, see constants
*
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.1
*/
public static function isEquivalent(\YoastSEO_Vendor\Psr\Http\Message\UriInterface $uri1, \YoastSEO_Vendor\Psr\Http\Message\UriInterface $uri2, int $normalizations = self::PRESERVING_NORMALIZATIONS) : bool
{
Interface
{
$regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-
Warning: include(/home/euromatb/public_html/croffles.co.uk/wp-content/plugins/wordpress-seo/src/initializers/migration-runner.php): failed to open stream: No such device in /home/euromatb/public_html/croffles.co.uk/wp-content/plugins/acf-content-analysis-for-yoast-seo/vendor/composer/ClassLoader.php on line 576
Warning: include(): Failed opening '/home/euromatb/public_html/croffles.co.uk/wp-content/plugins/wordpress-seo/vendor/composer/../../src/initializers/migration-runner.php' for inclusion (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home/euromatb/public_html/croffles.co.uk/wp-content/plugins/acf-content-analysis-for-yoast-seo/vendor/composer/ClassLoader.php on line 576
Parse error: syntax error, unexpected end of file in /home/euromatb/public_html/croffles.co.uk/wp-content/plugins/wordpress-seo/src/initializers/plugin-headers.php on line 58