Code Duplication    Length = 14-14 lines in 2 locations

src/Memcached.php 1 location

@@ 82-95 (lines=14) @@
79
	 *
80
	 * @since   1.0
81
	 */
82
	public function get($key)
83
	{
84
		$this->connect();
85
		$value = $this->driver->get($key);
86
		$code = $this->driver->getResultCode();
87
		$item = new Item($key);
88
89
		if ($code === \Memcached::RES_SUCCESS)
90
		{
91
			$item->setValue($value);
92
		}
93
94
		return $item;
95
	}
96
97
	/**
98
	 * Method to remove a storage entry for a key.

src/Redis.php 1 location

@@ 78-91 (lines=14) @@
75
	 *
76
	 * @since   1.0
77
	 */
78
	public function get($key)
79
	{
80
		$this->connect();
81
82
		$value = $this->driver->get($key);
83
		$item = new Item($key);
84
85
		if ($value !== false)
86
		{
87
			$item->setValue($value);
88
		}
89
90
		return $item;
91
	}
92
93
	/**
94
	 * Method to remove a storage entry for a key.