Code Duplication    Length = 6-6 lines in 2 locations

lib/Db/OtoConfirmationMapper.php 1 location

@@ 47-52 (lines=6) @@
44
		}
45
	}
46
	//deletes all confirmations where otoLayerId = $otoLayerId
47
	public function deleteConfirmationsByOtoLayer($otoLayerId){
48
		$sql = 'DELETE FROM `*PREFIX*calendar_oto_confirmations` WHERE `oto_layer_id` = ?';
49
		$stmt = $this->db->prepare($sql);
50
		$stmt->bindParam(1,$otoLayerId, \PDO::PARAM_INT);
51
		$stmt -> execute();
52
	}
53
	//deletes all confirmations with the given sourceId
54
	public function deleteBySourceId($sourceId,$userId){
55
		$sql = 'DELETE `t1` FROM `*PREFIX*calendar_oto_confirmations` AS `t1` ' .

lib/Db/OtoLayerMapper.php 1 location

@@ 57-62 (lines=6) @@
54
		}
55
	}
56
	//deletes all layers where otoLayerId = $otoLayerId
57
	public function deleteLayer($otoLayerId){
58
		$sql = 'DELETE FROM `*PREFIX*calendar_oto_layers` WHERE `oto_layer_id` = ?';
59
		$stmt = $this->db->prepare($sql);
60
		$stmt->bindParam(1,$otoLayerId, \PDO::PARAM_INT);
61
		$stmt -> execute();
62
	}
63
	//checks if a calendar layer is being used for scheduling
64
	public function isOtoLayer($sourceId){
65
		$sql = 'SELECT COUNT(*) AS `count` FROM `*PREFIX*calendar_oto_layers` ' .