Code Duplication    Length = 5-6 lines in 2 locations

class/oledrion_persistent_cart.php 1 location

@@ 76-80 (lines=5) @@
73
        if (Oledrion_utils::getModuleOption('persistent_cart') == 0) {
74
            return true;
75
        }
76
        if (is_array($persistent_product_id)) {
77
            $criteria = new Criteria('persistent_product_id', '(' . implode(',', $persistent_product_id) . ')', 'IN');
78
        } else {
79
            $criteria = new Criteria('persistent_product_id', $persistent_product_id, '=');
80
        }
81
82
        return $this->deleteAll($criteria);
83
    }

class/oledrion_products.php 1 location

@@ 1187-1192 (lines=6) @@
1184
     */
1185
    public function getCategoryProductsCount($cat_cid)
1186
    {
1187
        if (is_array($cat_cid)) {
1188
            $lst_ids  = implode(',', $cat_cid);
1189
            $criteria = new Criteria('product_cid', '(' . $lst_ids . ')', 'IN');
1190
        } else {
1191
            $criteria = new Criteria('product_cid', $cat_cid, '=');
1192
        }
1193
1194
        return $this->getCount($criteria);
1195
    }