Code Duplication    Length = 6-8 lines in 2 locations

src/Eccube/Controller/Admin/Shipping/EditController.php 1 location

@@ 370-375 (lines=6) @@
367
            }
368
369
            $forms = array();
370
            foreach ($OrderItems as $OrderItem) {
371
                /* @var $builder \Symfony\Component\Form\FormBuilderInterface */
372
                $builder = $this->formFactory->createNamedBuilder('', OrderItemType::class, $OrderItem);
373
                $addCartForm = $builder->getForm();
374
                $forms[$OrderItem->getId()] = $addCartForm->createView();
375
            }
376
377
            $event = new EventArgs(
378
                array(

src/Eccube/Controller/Admin/Order/EditController.php 1 location

@@ 644-651 (lines=8) @@
641
            }
642
643
            $forms = array();
644
            foreach ($Products as $Product) {
645
                /* @var $builder \Symfony\Component\Form\FormBuilderInterface */
646
                $builder = $this->formFactory->createNamedBuilder('', AddCartType::class, null, array(
647
                    'product' => $Product,
648
                ));
649
                $addCartForm = $builder->getForm();
650
                $forms[$Product->getId()] = $addCartForm->createView();
651
            }
652
653
            $event = new EventArgs(
654
                array(