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

@@ 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
                [