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

@@ 611-618 (lines=8) @@
608
            }
609
610
            $forms = [];
611
            foreach ($Products as $Product) {
612
                /* @var $builder \Symfony\Component\Form\FormBuilderInterface */
613
                $builder = $this->formFactory->createNamedBuilder('', AddCartType::class, null, [
614
                    'product' => $Product,
615
                ]);
616
                $addCartForm = $builder->getForm();
617
                $forms[$Product->getId()] = $addCartForm->createView();
618
            }
619
620
            $event = new EventArgs(
621
                [