Code Duplication    Length = 6-6 lines in 2 locations

src/Eccube/Service/PurchaseFlow/Processor/SaleLimitMultipleValidator.php 1 location

@@ 49-54 (lines=6) @@
46
    public function process(ItemHolderInterface $itemHolder, PurchaseContext $context)
47
    {
48
        $OrderItemsByProductClass = [];
49
        foreach ($itemHolder->getItems() as $Item) {
50
            if ($Item->isProduct()) {
51
                $id = $Item->getProductClass()->getId();
52
                $OrderItemsByProductClass[$id][] = $Item;
53
            }
54
        }
55
56
        foreach ($OrderItemsByProductClass as $id => $Items) {
57
            $ProductClass = $this->productClassRepository->find($id);

src/Eccube/Service/PurchaseFlow/Processor/StockMultipleValidator.php 1 location

@@ 49-54 (lines=6) @@
46
    public function process(ItemHolderInterface $itemHolder, PurchaseContext $context)
47
    {
48
        $OrderItemsByProductClass = [];
49
        foreach ($itemHolder->getItems() as $Item) {
50
            if ($Item->isProduct()) {
51
                $id = $Item->getProductClass()->getId();
52
                $OrderItemsByProductClass[$id][] = $Item;
53
            }
54
        }
55
56
        foreach ($OrderItemsByProductClass as $id => $Items) {
57
            $ProductClass = $this->productClassRepository->find($id);