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

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