Code Duplication    Length = 8-15 lines in 2 locations

src/Eccube/Controller/Admin/Order/EditController.php 1 location

@@ 619-626 (lines=8) @@
616
            }
617
618
            $forms = [];
619
            foreach ($Products as $Product) {
620
                /* @var $builder \Symfony\Component\Form\FormBuilderInterface */
621
                $builder = $this->formFactory->createNamedBuilder('', AddCartType::class, null, [
622
                    'product' => $Product,
623
                ]);
624
                $addCartForm = $builder->getForm();
625
                $forms[$Product->getId()] = $addCartForm->createView();
626
            }
627
628
            $event = new EventArgs(
629
                [

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(