Code Duplication    Length = 5-5 lines in 2 locations

src/Intraface/modules/product/Gateway.php 1 location

@@ 210-214 (lines=5) @@
207
208
            // den her skal vist lige kigges igennem, for den tager jo alt med p� nettet?
209
            // 0 = only stock
210
            if ($this->kernel->setting->get('intranet', 'webshop.show_online') == 0 and $which=='webshop') { // only stock
211
                if (array_key_exists('for_sale', $products[$i]['stock_status']) and $products[$i]['stock_status']['for_sale'] <= 0) {
212
                    continue;
213
                }
214
            }
215
            $i++;
216
        }
217
        $db->free();

src/Intraface/modules/product/Product.php 1 location

@@ 726-730 (lines=5) @@
723
            }
724
            // den her skal vist lige kigges igennem, for den tager jo alt med p� nettet?
725
            // 0 = only stock
726
            if ($this->kernel->setting->get('intranet', 'webshop.show_online') == 0 and !empty($which) and $which=='webshop') { // only stock
727
                if (array_key_exists('for_sale', $products[$key]['stock_status']) and $products[$key]['stock_status']['for_sale'] <= 0) {
728
                    continue;
729
                }
730
            }
731
            $key++;
732
        }
733
        return $products;