Code Duplication    Length = 8-8 lines in 2 locations

db/cachemanager.php 2 locations

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