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

@@ 650-657 (lines=8) @@
647
            }
648
649
            $forms = [];
650
            foreach ($Products as $Product) {
651
                /* @var $builder \Symfony\Component\Form\FormBuilderInterface */
652
                $builder = $this->formFactory->createNamedBuilder('', AddCartType::class, null, [
653
                    'product' => $Product,
654
                ]);
655
                $addCartForm = $builder->getForm();
656
                $forms[$Product->getId()] = $addCartForm->createView();
657
            }
658
659
            $event = new EventArgs(
660
                [