Code Duplication    Length = 8-15 lines in 2 locations

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

@@ 629-636 (lines=8) @@
626
            }
627
628
            $forms = [];
629
            foreach ($Products as $Product) {
630
                /* @var $builder \Symfony\Component\Form\FormBuilderInterface */
631
                $builder = $this->formFactory->createNamedBuilder('', AddCartType::class, null, [
632
                    'product' => $Product,
633
                ]);
634
                $addCartForm = $builder->getForm();
635
                $forms[$Product->getId()] = $addCartForm->createView();
636
            }
637
638
            $event = new EventArgs(
639
                [

src/Eccube/Controller/ProductController.php 1 location

@@ 182-196 (lines=15) @@
179
180
        // addCart form
181
        $forms = [];
182
        foreach ($pagination as $Product) {
183
            /* @var $builder \Symfony\Component\Form\FormBuilderInterface */
184
            $builder = $this->formFactory->createNamedBuilder(
185
                '',
186
                AddCartType::class,
187
                null,
188
                [
189
                    'product' => $ProductsAndClassCategories[$Product->getId()],
190
                    'allow_extra_fields' => true,
191
                ]
192
            );
193
            $addCartForm = $builder->getForm();
194
195
            $forms[$Product->getId()] = $addCartForm->createView();
196
        }
197
198
        // 表示件数
199
        $builder = $this->formFactory->createNamedBuilder(