Code Duplication    Length = 11-11 lines in 2 locations

Tests/MemcachedTest.php 1 location

@@ 60-70 (lines=11) @@
57
				$server = new \stdClass;
58
59
				// Parse each part and populate the options array.
60
				foreach ($parts as $part)
61
				{
62
					list ($k, $v) = explode('=', $part, 2);
63
					switch ($k)
64
					{
65
						case 'host':
66
						case 'port':
67
							$server->$k = $v;
68
							break;
69
					}
70
				}
71
				$options['memcache.servers'] = array($server);
72
			}
73

Tests/RedisTest.php 1 location

@@ 292-302 (lines=11) @@
289
			$parts = explode(';', $dsn);
290
291
			// Parse each part and populate the options array.
292
			foreach ($parts as $part)
293
			{
294
				list ($k, $v) = explode('=', $part, 2);
295
				switch ($k)
296
				{
297
					case 'host':
298
					case 'port':
299
						$options['redis.' . $k] = $v;
300
						break;
301
				}
302
			}
303
304
			$this->cacheOptions = $options;
305
		}