Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 524-530 (lines=7) @@
521
522
                        // promotionアイテム
523
                        $i = 0;
524
                        foreach ($items as $item) {
525
                            if ($item['promotion'] == 1) {
526
                                $promotionItems[] = $item;
527
                                unset($items[$i]);
528
                            }
529
                            $i++;
530
                        }
531
532
                    } else {
533
                        $message = $data['error_code'].' : '.$data['error_message'];

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

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