getHost(), $modified->getHost()) !== 0) { return true; } if ($original->getScheme() !== $modified->getScheme()) { return true; } if (self::computePort($original) !== self::computePort($modified)) { return true; } return false; } private static function computePort(UriInterface $uri): ?int { $port = $uri->getPort(); if (null !== $port) { return $port; } if ('http' === $uri->getScheme()) { return 80; } if ('https' === $uri->getScheme()) { return 443; } return null; } private function __construct() { // cannot be instantiated } }