Code Duplication    Length = 8-15 lines in 2 locations

src/Eccube/Controller/ProductController.php 1 location

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

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

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