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

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