Code Duplication    Length = 6-6 lines in 5 locations

src/PlaygroundGame/Service/Game.php 5 locations

@@ 2098-2103 (lines=6) @@
2095
        $factory = new InputFactory();
2096
        
2097
        foreach ($formPV as $element) {
2098
            if (isset($element->line_text)) {
2099
                $attr  = $this->getAttributes($element->line_text[0]);
2100
                $element = new Element\Text($attr['name']);
2101
                $element = $this->decorate($element, $attr, $inputFilter);
2102
                $form->add($element);
2103
            }
2104
            if (isset($element->line_password)) {
2105
                $attr = $this->getAttributes($element->line_password[0]);
2106
                $element = new Element\Password($attr['name']);
@@ 2104-2109 (lines=6) @@
2101
                $element = $this->decorate($element, $attr, $inputFilter);
2102
                $form->add($element);
2103
            }
2104
            if (isset($element->line_password)) {
2105
                $attr = $this->getAttributes($element->line_password[0]);
2106
                $element = new Element\Password($attr['name']);
2107
                $element = $this->decorate($element, $attr, $inputFilter);
2108
                $form->add($element);
2109
            }
2110
            if (isset($element->line_hidden)) {
2111
                $attr = $this->getAttributes($element->line_hidden[0]);
2112
                $element = new Element\Hidden($attr['name']);
@@ 2110-2115 (lines=6) @@
2107
                $element = $this->decorate($element, $attr, $inputFilter);
2108
                $form->add($element);
2109
            }
2110
            if (isset($element->line_hidden)) {
2111
                $attr = $this->getAttributes($element->line_hidden[0]);
2112
                $element = new Element\Hidden($attr['name']);
2113
                $element = $this->decorate($element, $attr, $inputFilter);
2114
                $form->add($element);
2115
            }
2116
            if (isset($element->line_email)) {
2117
                $attr = $this->getAttributes($element->line_email[0]);
2118
                $element = new Element\Email($attr['name']);
@@ 2116-2121 (lines=6) @@
2113
                $element = $this->decorate($element, $attr, $inputFilter);
2114
                $form->add($element);
2115
            }
2116
            if (isset($element->line_email)) {
2117
                $attr = $this->getAttributes($element->line_email[0]);
2118
                $element = new Element\Email($attr['name']);
2119
                $element = $this->decorate($element, $attr, $inputFilter);
2120
                $form->add($element);
2121
            }
2122
            if (isset($element->line_radio)) {
2123
                $attr = $this->getAttributes($element->line_radio[0]);
2124
                $element = new Element\Radio($attr['name']);
@@ 2223-2228 (lines=6) @@
2220
                    'allowEmpty' => !$attr['required'],
2221
                )));
2222
            }
2223
            if (isset($element->line_paragraph)) {
2224
                $attr = $this->getAttributes($element->line_paragraph[0]);
2225
                $element = new Element\Textarea($attr['name']);
2226
                $element = $this->decorate($element, $attr, $inputFilter);
2227
                $form->add($element);
2228
            }
2229
            if (isset($element->line_upload)) {
2230
                $attr = $this->getAttributes($element->line_upload[0]);
2231
                $element = new Element\File($attr['name']);