Code Duplication    Length = 9-14 lines in 5 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/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

application/models/cms_admin.php 2 locations

@@ 166-175 (lines=10) @@
163
     * @param int $id
164
     * @return bool|array
165
     */
166
    public function get_category($id) {
167
168
        $this->db->where('id', $id);
169
        $query = $this->db->get('category', 1);
170
171
        if ($query->num_rows() > 0) {
172
            return $query->row_array();
173
        }
174
175
        return FALSE;
176
    }
177
178
    /**
@@ 277-286 (lines=10) @@
274
     * @param $id
275
     * @return bool|array
276
     */
277
    public function get_lang($id) {
278
279
        $this->db->where('id', $id);
280
        $query = $this->db->get('languages', 1);
281
282
        if ($query->num_rows() == 1) {
283
            return $query->row_array();
284
        }
285
286
        return FALSE;
287
    }
288
289
    /**

application/modules/comments/commentsapi.php 1 location

@@ 671-684 (lines=14) @@
668
    /**
669
     * @return string
670
     */
671
    public function getCommentsLocale() {
672
673
        /** @var CI_DB_result $locale */
674
        $locale = $this->db->get_where('languages', ['identif' => $this->comments_locale]);
675
676
        if ($locale->num_rows() > 0) {
677
678
            $locale_arr = $locale->row_array();
679
            return $locale_arr['id'];
680
681
        }
682
        return false;
683
684
    }
685
686
    /**
687
     * @return void