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

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