Code Duplication    Length = 12-12 lines in 2 locations

manager/includes/src/Legacy/Categories.php 2 locations

@@ 51-62 (lines=12) @@
48
     * @param string $where
49
     * @return array|bool|object|stdClass
50
     */
51
    public function getCategory($search, $where = 'category')
52
    {
53
        $category = $this->db->getRow(
54
            $this->db->select(
55
                '*',
56
                $this->db_tbl['categories'],
57
                "`" . $where . "` = '" . $this->db->escape($search) . "'"
58
            )
59
        );
60
61
        return $category;
62
    }
63
64
    /**
65
     * @param string $value
@@ 70-81 (lines=12) @@
67
     * @param string $where
68
     * @return bool|int|string
69
     */
70
    public function getCategoryValue($value, $search, $where = 'category')
71
    {
72
        $_value = $this->db->getValue(
73
            $this->db->select(
74
                '`' . $value . '`',
75
                $this->db_tbl['categories'],
76
                "`" . $where . "` = '" . $this->db->escape($search) . "'"
77
            )
78
        );
79
80
        return $_value;
81
    }
82
83
    /**
84
     * @param int $category_id