Code Duplication    Length = 17-17 lines in 2 locations

src/Model/ExamDeleteModel.php 1 location

@@ 7-23 (lines=17) @@
4
5
use PDO;
6
7
class ExamDeleteModel extends AbstractModel
8
{
9
    public function delete(int $examID): bool
10
    {
11
        $stmt = $this->db->prepare('DELETE FROM exams WHERE id = :id');
12
        $stmt->bindValue(':id', $examID, PDO::PARAM_INT);
13
14
        return $stmt->execute();
15
    }
16
}
17

src/Model/QuestionDeleteModel.php 1 location

@@ 7-23 (lines=17) @@
4
5
use PDO;
6
7
class QuestionDeleteModel extends AbstractModel
8
{
9
    public function delete(int $questionID): bool
10
    {
11
        $stmt = $this->db->prepare('DELETE FROM questions WHERE id = :id');
12
        $stmt->bindValue(':id', $questionID, PDO::PARAM_INT);
13
14
        return $stmt->execute();
15
    }
16
}
17