: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
declare (strict_types=1);
namespace YoastSEO_Vendor\GuzzleHttp\Psr7;
use YoastSEO_Vendor\Psr\Http\Message\UriInterface;
* Provides methods to determine if a modified URL should be considered cross-origin.
* @author Graham Campbell
final class UriComparator
* Determines if a modified URL should be considered cross-origin with
* respect to an original URL.
public static function isCrossOrigin(\YoastSEO_Vendor\Psr\Http\Message\UriInterface $original, \YoastSEO_Vendor\Psr\Http\Message\UriInterface $modified) : bool
if (\strcasecmp($original->getHost(), $modified->getHost()) !== 0) {
if ($original->getScheme() !== $modified->getScheme()) {
if (self::computePort($original) !== self::computePort($modified)) {
private static function computePort(\YoastSEO_Vendor\Psr\Http\Message\UriInterface $uri) : int
return 'https' === $uri->getScheme() ? 443 : 80;
private function __construct()
// cannot be instantiated