Code Duplication    Length = 12-13 lines in 2 locations

src/Adapter/Memcached.php 1 location

@@ 69-81 (lines=13) @@
66
	 *
67
	 * @since   __DEPLOY_VERSION__
68
	 */
69
	public function getItem($key)
70
	{
71
		$value = $this->driver->get($key);
72
		$code = $this->driver->getResultCode();
73
		$item = new Item($key);
74
75
		if ($code === \Memcached::RES_SUCCESS)
76
		{
77
			$item->set($value);
78
		}
79
80
		return $item;
81
	}
82
83
	/**
84
	 * Returns a traversable set of cache items.

src/Adapter/Redis.php 1 location

@@ 68-79 (lines=12) @@
65
	 *
66
	 * @since   __DEPLOY_VERSION__
67
	 */
68
	public function getItem($key)
69
	{
70
		$value = $this->driver->get($key);
71
		$item = new Item($key);
72
73
		if ($value !== false)
74
		{
75
			$item->set($value);
76
		}
77
78
		return $item;
79
	}
80
81
	/**
82
	 * Removes the item from the pool.