Code Duplication    Length = 7-7 lines in 2 locations

src/Eccube/Controller/Admin/Store/OwnerStoreController.php 1 location

@@ 146-152 (lines=7) @@
143
144
                    // Promotion item
145
                    $i = 0;
146
                    foreach ($items as $item) {
147
                        if ($item['promotion'] == 1) {
148
                            $promotionItems[] = $item;
149
                            unset($items[$i]);
150
                        }
151
                        $i++;
152
                    }
153
                } else {
154
                    $message = $data['error_code'].' : '.$data['error_message'];
155
                }

src/Eccube/Controller/Admin/Store/PluginController.php 1 location

@@ 566-572 (lines=7) @@
563
564
                        // promotionアイテム
565
                        $i = 0;
566
                        foreach ($items as $item) {
567
                            if ($item['promotion'] == 1) {
568
                                $promotionItems[] = $item;
569
                                unset($items[$i]);
570
                            }
571
                            $i++;
572
                        }
573
574
                    } else {
575
                        $message = $data['error_code'].' : '.$data['error_message'];