Code Duplication    Length = 5-6 lines in 2 locations

Sources/CacheAPI-memcache.php 1 location

@@ 66-71 (lines=6) @@
63
			// Normal host names do not contain slashes, while e.g. unix sockets do. Assume alternative transport pipe with port 0.
64
			if (strpos($server,'/') !== false)
65
				$host = $server;
66
			else
67
			{
68
				$server = explode(':', $server);
69
				$host = $server[0];
70
				$port = isset($server[1]) ? $server[1] : 11211;
71
			}
72
73
			// Don't wait too long: yes, we want the server, but we might be able to run the query faster!
74
			if (empty($db_persist))

Sources/CacheAPI-memcached.php 1 location

@@ 58-62 (lines=5) @@
55
		{
56
			if (strpos($server,'/') !== false)
57
				$tempServer = array($server, 0);
58
			else
59
			{
60
				$server = explode(':', $server);
61
				$tempServer = array($server[0], isset($server[1]) ? $server[1] : 11211);
62
			}
63
64
			// Figure out if we have this server or not
65
			$foundServer = false;