Code Duplication    Length = 7-8 lines in 2 locations

library/Requests.php 1 location

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

library/Requests/SSL.php 1 location

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