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

@@ 997-1003 (lines=7) @@
994
		// Also validates that the host has 3 parts or more, as per Firefox's
995
		// ruleset.
996
		$parts = explode('.', $host);
997
		if (ip2long($host) === false && count($parts) >= 3) {
998
			$parts[0] = '*';
999
			$wildcard = implode('.', $parts);
1000
			if ($wildcard === $reference) {
1001
				return true;
1002
			}
1003
		}
1004
1005
		return false;
1006
	}