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

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