Code Duplication    Length = 8-8 lines in 2 locations

db/cachemanager.php 2 locations

@@ 26-33 (lines=8) @@
23
	 */
24
	
25
	
26
	public function insert($hash,$raw){
27
		$serialized = serialize($raw);
28
		$sql = "INSERT INTO `*PREFIX*maps_adress_cache` (adres_hash,serialized) VALUES(?,?)";
29
		$query = $this -> db -> prepare($sql);
30
		$query -> bindParam(1, $hash, \PDO::PARAM_STR);
31
		$query -> bindParam(2, $serialized, \PDO::PARAM_STR);
32
		$result = $query -> execute();
33
	}
34
	
35
	public function check($hash){
36
		$sql = 'SELECT * from `*PREFIX*maps_adress_cache` where adres_hash=?';
@@ 35-42 (lines=8) @@
32
		$result = $query -> execute();
33
	}
34
	
35
	public function check($hash){
36
		$sql = 'SELECT * from `*PREFIX*maps_adress_cache` where adres_hash=?';
37
		$query = $this -> db -> prepare($sql);
38
		$query -> bindParam(1, $hash, \PDO::PARAM_STR);
39
		$query -> execute();
40
		$result = $query->fetch();
41
		return unserialize($result['serialized']);
42
	} 
43
}
44