Code Duplication    Length = 6-8 lines in 2 locations

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

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

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

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