Code Duplication    Length = 6-6 lines in 5 locations

src/PlaygroundGame/Service/Game.php 5 locations

@@ 2072-2077 (lines=6) @@
2069
        $factory = new InputFactory();
2070
        
2071
        foreach ($formPV as $element) {
2072
            if (isset($element->line_text)) {
2073
                $attr  = $this->getAttributes($element->line_text[0]);
2074
                $element = new Element\Text($attr['name']);
2075
                $element = $this->decorate($element, $attr, $inputFilter);
2076
                $form->add($element);
2077
            }
2078
            if (isset($element->line_password)) {
2079
                $attr = $this->getAttributes($element->line_password[0]);
2080
                $element = new Element\Password($attr['name']);
@@ 2078-2083 (lines=6) @@
2075
                $element = $this->decorate($element, $attr, $inputFilter);
2076
                $form->add($element);
2077
            }
2078
            if (isset($element->line_password)) {
2079
                $attr = $this->getAttributes($element->line_password[0]);
2080
                $element = new Element\Password($attr['name']);
2081
                $element = $this->decorate($element, $attr, $inputFilter);
2082
                $form->add($element);
2083
            }
2084
            if (isset($element->line_hidden)) {
2085
                $attr = $this->getAttributes($element->line_hidden[0]);
2086
                $element = new Element\Hidden($attr['name']);
@@ 2084-2089 (lines=6) @@
2081
                $element = $this->decorate($element, $attr, $inputFilter);
2082
                $form->add($element);
2083
            }
2084
            if (isset($element->line_hidden)) {
2085
                $attr = $this->getAttributes($element->line_hidden[0]);
2086
                $element = new Element\Hidden($attr['name']);
2087
                $element = $this->decorate($element, $attr, $inputFilter);
2088
                $form->add($element);
2089
            }
2090
            if (isset($element->line_email)) {
2091
                $attr = $this->getAttributes($element->line_email[0]);
2092
                $element = new Element\Email($attr['name']);
@@ 2090-2095 (lines=6) @@
2087
                $element = $this->decorate($element, $attr, $inputFilter);
2088
                $form->add($element);
2089
            }
2090
            if (isset($element->line_email)) {
2091
                $attr = $this->getAttributes($element->line_email[0]);
2092
                $element = new Element\Email($attr['name']);
2093
                $element = $this->decorate($element, $attr, $inputFilter);
2094
                $form->add($element);
2095
            }
2096
            if (isset($element->line_radio)) {
2097
                $attr = $this->getAttributes($element->line_radio[0]);
2098
                $element = new Element\Radio($attr['name']);
@@ 2197-2202 (lines=6) @@
2194
                    'allowEmpty' => !$attr['required'],
2195
                )));
2196
            }
2197
            if (isset($element->line_paragraph)) {
2198
                $attr = $this->getAttributes($element->line_paragraph[0]);
2199
                $element = new Element\Textarea($attr['name']);
2200
                $element = $this->decorate($element, $attr, $inputFilter);
2201
                $form->add($element);
2202
            }
2203
            if (isset($element->line_upload)) {
2204
                $attr = $this->getAttributes($element->line_upload[0]);
2205
                $element = new Element\File($attr['name']);