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

@@ 985-991 (lines=7) @@
982
		// Also validates that the host has 3 parts or more, as per Firefox's
983
		// ruleset.
984
		$parts = explode('.', $host);
985
		if (ip2long($host) === false && count($parts) >= 3) {
986
			$parts[0] = '*';
987
			$wildcard = implode('.', $parts);
988
			if ($wildcard === $reference) {
989
				return true;
990
			}
991
		}
992
993
		return false;
994
	}