Code Duplication    Length = 6-6 lines in 5 locations

src/Service/Game.php 5 locations

@@ 2065-2070 (lines=6) @@
2062
        $factory = new InputFactory();
2063
        
2064
        foreach ($formPV as $element) {
2065
            if (isset($element->line_text)) {
2066
                $attr  = $this->getAttributes($element->line_text[0]);
2067
                $element = new Element\Text($attr['name']);
2068
                $element = $this->decorate($element, $attr, $inputFilter);
2069
                $form->add($element);
2070
            }
2071
            if (isset($element->line_password)) {
2072
                $attr = $this->getAttributes($element->line_password[0]);
2073
                $element = new Element\Password($attr['name']);
@@ 2071-2076 (lines=6) @@
2068
                $element = $this->decorate($element, $attr, $inputFilter);
2069
                $form->add($element);
2070
            }
2071
            if (isset($element->line_password)) {
2072
                $attr = $this->getAttributes($element->line_password[0]);
2073
                $element = new Element\Password($attr['name']);
2074
                $element = $this->decorate($element, $attr, $inputFilter);
2075
                $form->add($element);
2076
            }
2077
            if (isset($element->line_hidden)) {
2078
                $attr = $this->getAttributes($element->line_hidden[0]);
2079
                $element = new Element\Hidden($attr['name']);
@@ 2077-2082 (lines=6) @@
2074
                $element = $this->decorate($element, $attr, $inputFilter);
2075
                $form->add($element);
2076
            }
2077
            if (isset($element->line_hidden)) {
2078
                $attr = $this->getAttributes($element->line_hidden[0]);
2079
                $element = new Element\Hidden($attr['name']);
2080
                $element = $this->decorate($element, $attr, $inputFilter);
2081
                $form->add($element);
2082
            }
2083
            if (isset($element->line_email)) {
2084
                $attr = $this->getAttributes($element->line_email[0]);
2085
                $element = new Element\Email($attr['name']);
@@ 2083-2088 (lines=6) @@
2080
                $element = $this->decorate($element, $attr, $inputFilter);
2081
                $form->add($element);
2082
            }
2083
            if (isset($element->line_email)) {
2084
                $attr = $this->getAttributes($element->line_email[0]);
2085
                $element = new Element\Email($attr['name']);
2086
                $element = $this->decorate($element, $attr, $inputFilter);
2087
                $form->add($element);
2088
            }
2089
            if (isset($element->line_radio)) {
2090
                $attr = $this->getAttributes($element->line_radio[0]);
2091
                $element = new Element\Radio($attr['name']);
@@ 2190-2195 (lines=6) @@
2187
                    'allowEmpty' => !$attr['required'],
2188
                )));
2189
            }
2190
            if (isset($element->line_paragraph)) {
2191
                $attr = $this->getAttributes($element->line_paragraph[0]);
2192
                $element = new Element\Textarea($attr['name']);
2193
                $element = $this->decorate($element, $attr, $inputFilter);
2194
                $form->add($element);
2195
            }
2196
            if (isset($element->line_upload)) {
2197
                $attr = $this->getAttributes($element->line_upload[0]);
2198
                $element = new Element\File($attr['name']);