Code Duplication    Length = 6-6 lines in 5 locations

src/Service/Game.php 5 locations

@@ 1917-1922 (lines=6) @@
1914
        $factory = new InputFactory();
1915
        
1916
        foreach ($formPV as $element) {
1917
            if (isset($element->line_text)) {
1918
                $attr  = $this->getAttributes($element->line_text[0]);
1919
                $element = new Element\Text($attr['name']);
1920
                $element = $this->decorate($element, $attr, $inputFilter);
1921
                $form->add($element);
1922
            }
1923
            if (isset($element->line_password)) {
1924
                $attr = $this->getAttributes($element->line_password[0]);
1925
                $element = new Element\Password($attr['name']);
@@ 1923-1928 (lines=6) @@
1920
                $element = $this->decorate($element, $attr, $inputFilter);
1921
                $form->add($element);
1922
            }
1923
            if (isset($element->line_password)) {
1924
                $attr = $this->getAttributes($element->line_password[0]);
1925
                $element = new Element\Password($attr['name']);
1926
                $element = $this->decorate($element, $attr, $inputFilter);
1927
                $form->add($element);
1928
            }
1929
            if (isset($element->line_hidden)) {
1930
                $attr = $this->getAttributes($element->line_hidden[0]);
1931
                $element = new Element\Hidden($attr['name']);
@@ 1929-1934 (lines=6) @@
1926
                $element = $this->decorate($element, $attr, $inputFilter);
1927
                $form->add($element);
1928
            }
1929
            if (isset($element->line_hidden)) {
1930
                $attr = $this->getAttributes($element->line_hidden[0]);
1931
                $element = new Element\Hidden($attr['name']);
1932
                $element = $this->decorate($element, $attr, $inputFilter);
1933
                $form->add($element);
1934
            }
1935
            if (isset($element->line_email)) {
1936
                $attr = $this->getAttributes($element->line_email[0]);
1937
                $element = new Element\Email($attr['name']);
@@ 1935-1940 (lines=6) @@
1932
                $element = $this->decorate($element, $attr, $inputFilter);
1933
                $form->add($element);
1934
            }
1935
            if (isset($element->line_email)) {
1936
                $attr = $this->getAttributes($element->line_email[0]);
1937
                $element = new Element\Email($attr['name']);
1938
                $element = $this->decorate($element, $attr, $inputFilter);
1939
                $form->add($element);
1940
            }
1941
            if (isset($element->line_radio)) {
1942
                $attr = $this->getAttributes($element->line_radio[0]);
1943
                $element = new Element\Radio($attr['name']);
@@ 2042-2047 (lines=6) @@
2039
                    'allowEmpty' => !$attr['required'],
2040
                )));
2041
            }
2042
            if (isset($element->line_paragraph)) {
2043
                $attr = $this->getAttributes($element->line_paragraph[0]);
2044
                $element = new Element\Textarea($attr['name']);
2045
                $element = $this->decorate($element, $attr, $inputFilter);
2046
                $form->add($element);
2047
            }
2048
            if (isset($element->line_upload)) {
2049
                $attr = $this->getAttributes($element->line_upload[0]);
2050
                $element = new Element\File($attr['name']);