Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 548-554 (lines=7) @@
545
546
                        // promotionアイテム
547
                        $i = 0;
548
                        foreach ($items as $item) {
549
                            if ($item['promotion'] == 1) {
550
                                $promotionItems[] = $item;
551
                                unset($items[$i]);
552
                            }
553
                            $i++;
554
                        }
555
556
                    } else {
557
                        $message = $data['error_code'].' : '.$data['error_message'];

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
                }