Code Duplication    Length = 7-8 lines in 2 locations

library/Requests/SSL.php 1 location

@@ 141-148 (lines=8) @@
138
		// Calculate the valid wildcard match if the host is not an IP address
139
		// Also validates that the host has 3 parts or more, as per Firefox's
140
		// ruleset.
141
		if (ip2long($host) === false) {
142
			$parts = explode('.', $host);
143
			$parts[0] = '*';
144
			$wildcard = implode('.', $parts);
145
			if ($wildcard === $reference) {
146
				return true;
147
			}
148
		}
149
150
		return false;
151
	}

library/Requests.php 1 location

@@ 972-978 (lines=7) @@
969
		// Also validates that the host has 3 parts or more, as per Firefox's
970
		// ruleset.
971
		$parts = explode('.', $host);
972
		if (ip2long($host) === false && count($parts) >= 3) {
973
			$parts[0] = '*';
974
			$wildcard = implode('.', $parts);
975
			if ($wildcard === $reference) {
976
				return true;
977
			}
978
		}
979
980
		return false;
981
	}