Code Duplication    Length = 8-15 lines in 2 locations

src/Eccube/Controller/ProductController.php 1 location

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

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

@@ 622-629 (lines=8) @@
619
            }
620
621
            $forms = [];
622
            foreach ($Products as $Product) {
623
                /* @var $builder \Symfony\Component\Form\FormBuilderInterface */
624
                $builder = $this->formFactory->createNamedBuilder('', AddCartType::class, null, [
625
                    'product' => $this->productRepository->findWithSortedClassCategories($Product->getId()),
626
                ]);
627
                $addCartForm = $builder->getForm();
628
                $forms[$Product->getId()] = $addCartForm->createView();
629
            }
630
631
            $event = new EventArgs(
632
                [