Code Duplication    Length = 8-15 lines in 2 locations

src/Eccube/Controller/ProductController.php 1 location

@@ 161-175 (lines=15) @@
158
159
        // addCart form
160
        $forms = [];
161
        foreach ($pagination as $Product) {
162
            /* @var $builder \Symfony\Component\Form\FormBuilderInterface */
163
            $builder = $this->formFactory->createNamedBuilder(
164
                '',
165
                AddCartType::class,
166
                null,
167
                [
168
                    'product' => $Product,
169
                    'allow_extra_fields' => true,
170
                ]
171
            );
172
            $addCartForm = $builder->getForm();
173
174
            $forms[$Product->getId()] = $addCartForm->createView();
175
        }
176
177
        // 表示件数
178
        $builder = $this->formFactory->createNamedBuilder(

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

@@ 581-588 (lines=8) @@
578
            }
579
580
            $forms = [];
581
            foreach ($Products as $Product) {
582
                /* @var $builder \Symfony\Component\Form\FormBuilderInterface */
583
                $builder = $this->formFactory->createNamedBuilder('', AddCartType::class, null, [
584
                    'product' => $Product,
585
                ]);
586
                $addCartForm = $builder->getForm();
587
                $forms[$Product->getId()] = $addCartForm->createView();
588
            }
589
590
            $event = new EventArgs(
591
                [