Code Duplication    Length = 9-10 lines in 4 locations

application/modules/mod_discount/models/discount_model_admin.php 1 location

@@ 74-82 (lines=9) @@
71
     * Get main currency symbol
72
     * @return boolean
73
     */
74
    public function getMainCurrencySymbol() {
75
        $query = $this->db->select('symbol')->where('main', 1)->get('shop_currencies')->row_array();
76
77
        if ($query) {
78
            return $query['symbol'];
79
        } else {
80
            return false;
81
        }
82
    }
83
84
    /**
85
     * Check have any discoun with given key

application/models/cms_admin.php 2 locations

@@ 183-192 (lines=10) @@
180
     * @param int $id
181
     * @return bool|array
182
     */
183
    public function get_category($id) {
184
185
        $this->db->where('id', $id);
186
        $query = $this->db->get('category', 1);
187
188
        if ($query->num_rows() > 0) {
189
            return $query->row_array();
190
        }
191
192
        return FALSE;
193
    }
194
195
    /**
@@ 294-303 (lines=10) @@
291
     * @param $id
292
     * @return bool|array
293
     */
294
    public function get_lang($id) {
295
296
        $this->db->where('id', $id);
297
        $query = $this->db->get('languages', 1);
298
299
        if ($query->num_rows() == 1) {
300
            return $query->row_array();
301
        }
302
303
        return FALSE;
304
    }
305
306
    /**

application/modules/mod_stats/models/stats_model.php 1 location

@@ 158-166 (lines=9) @@
155
     * Get main currency symbol
156
     * @return array
157
     */
158
    public function getMainCurrencySymbol() {
159
        $query = $this->db->select('symbol')->where('main', 1)->get('shop_currencies')->row_array();
160
161
        if ($query) {
162
            return $query['symbol'];
163
        } else {
164
            return [];
165
        }
166
    }
167
168
    /**
169
     * Get first level categories