Code Duplication    Length = 10-17 lines in 5 locations

src/module/Albums/One/Admin/DelModel.php 1 location

@@ 7-23 (lines=17) @@
4
5
use Rudolf\Framework\Model\AdminModel;
6
7
class DelModel extends AdminModel
8
{
9
    /**
10
     * Delete article.
11
     *
12
     * @param int $id Article ID
13
     *
14
     * @return bool
15
     */
16
    public function delete($id)
17
    {
18
        $query = $this->pdo->prepare("DELETE FROM {$this->prefix}albums WHERE id = :id");
19
        $query->bindValue(':id', $id, \PDO::PARAM_INT);
20
21
        return $query->execute();
22
    }
23
}
24

src/module/Articles/One/Admin/DelModel.php 1 location

@@ 7-23 (lines=17) @@
4
5
use Rudolf\Framework\Model\AdminModel;
6
7
class DelModel extends AdminModel
8
{
9
    /**
10
     * Delete article.
11
     *
12
     * @param int $id Article ID
13
     *
14
     * @return bool
15
     */
16
    public function delete($id)
17
    {
18
        $query = $this->pdo->prepare("DELETE FROM {$this->prefix}articles WHERE id = :id");
19
        $query->bindValue(':id', $id, \PDO::PARAM_INT);
20
21
        return $query->execute();
22
    }
23
}
24

src/module/Categories/One/Admin/DelModel.php 1 location

@@ 7-23 (lines=17) @@
4
5
use Rudolf\Framework\Model\AdminModel;
6
7
class DelModel extends AdminModel
8
{
9
    /**
10
     * Delete category.
11
     *
12
     * @param int $id Category ID
13
     *
14
     * @return bool
15
     */
16
    public function delete($id)
17
    {
18
        $query = $this->pdo->prepare("DELETE FROM {$this->prefix}categories WHERE id = :id");
19
        $query->bindValue(':id', $id, \PDO::PARAM_INT);
20
21
        return $query->execute();
22
    }
23
}
24

src/module/Pages/One/Admin/DelModel.php 1 location

@@ 7-23 (lines=17) @@
4
5
use Rudolf\Framework\Model\AdminModel;
6
7
class DelModel extends AdminModel
8
{
9
    /**
10
     * Delete page.
11
     *
12
     * @param int $id Article ID
13
     *
14
     * @return bool
15
     */
16
    public function delete($id)
17
    {
18
        $query = $this->pdo->prepare("DELETE FROM {$this->prefix}pages WHERE id = :id");
19
        $query->bindValue(':id', $id, \PDO::PARAM_INT);
20
21
        return $query->execute();
22
    }
23
}
24

src/module/Users/One/Admin/Profile/DelModel.php 1 location

@@ 7-16 (lines=10) @@
4
5
use Rudolf\Framework\Model\AdminModel;
6
7
class DelModel extends AdminModel
8
{
9
    public function del($id)
10
    {
11
        $query = $this->pdo->prepare("DELETE FROM {$this->prefix}users WHERE id = :id");
12
        $query->bindValue(':id', $id, \PDO::PARAM_INT);
13
14
        return $query->execute();
15
    }
16
}
17