Code Duplication    Length = 6-6 lines in 5 locations

src/Service/Game.php 5 locations

@@ 2309-2314 (lines=6) @@
2306
        $factory = new InputFactory();
2307
2308
        foreach ($formPV as $element) {
2309
            if (isset($element->line_text)) {
2310
                $attr  = $this->getAttributes($element->line_text[0]);
2311
                $element = new Element\Text($attr['name']);
2312
                $element = $this->decorate($element, $attr, $inputFilter);
2313
                $form->add($element);
2314
            }
2315
            if (isset($element->line_key)) {
2316
                $attr  = $this->getAttributes($element->line_key[0]);
2317
                $element = new Element\Text($attr['name']);
@@ 2334-2339 (lines=6) @@
2331
                    ),
2332
                )));
2333
            }
2334
            if (isset($element->line_password)) {
2335
                $attr = $this->getAttributes($element->line_password[0]);
2336
                $element = new Element\Password($attr['name']);
2337
                $element = $this->decorate($element, $attr, $inputFilter);
2338
                $form->add($element);
2339
            }
2340
            if (isset($element->line_hidden)) {
2341
                $attr = $this->getAttributes($element->line_hidden[0]);
2342
                $element = new Element\Hidden($attr['name']);
@@ 2340-2345 (lines=6) @@
2337
                $element = $this->decorate($element, $attr, $inputFilter);
2338
                $form->add($element);
2339
            }
2340
            if (isset($element->line_hidden)) {
2341
                $attr = $this->getAttributes($element->line_hidden[0]);
2342
                $element = new Element\Hidden($attr['name']);
2343
                $element = $this->decorate($element, $attr, $inputFilter);
2344
                $form->add($element);
2345
            }
2346
            if (isset($element->line_email)) {
2347
                $attr = $this->getAttributes($element->line_email[0]);
2348
                $element = new Element\Email($attr['name']);
@@ 2346-2351 (lines=6) @@
2343
                $element = $this->decorate($element, $attr, $inputFilter);
2344
                $form->add($element);
2345
            }
2346
            if (isset($element->line_email)) {
2347
                $attr = $this->getAttributes($element->line_email[0]);
2348
                $element = new Element\Email($attr['name']);
2349
                $element = $this->decorate($element, $attr, $inputFilter);
2350
                $form->add($element);
2351
            }
2352
            if (isset($element->line_radio)) {
2353
                $attr = $this->getAttributes($element->line_radio[0]);
2354
                $element = new Element\Radio($attr['name']);
@@ 2453-2458 (lines=6) @@
2450
                    'allowEmpty' => !$attr['required'],
2451
                )));
2452
            }
2453
            if (isset($element->line_paragraph)) {
2454
                $attr = $this->getAttributes($element->line_paragraph[0]);
2455
                $element = new Element\Textarea($attr['name']);
2456
                $element = $this->decorate($element, $attr, $inputFilter);
2457
                $form->add($element);
2458
            }
2459
            if (isset($element->line_upload)) {
2460
                $attr = $this->getAttributes($element->line_upload[0]);
2461
                $element = new Element\File($attr['name']);