Code Duplication    Length = 6-6 lines in 5 locations

src/PlaygroundGame/Service/Game.php 5 locations

@@ 1869-1874 (lines=6) @@
1866
        $factory = new InputFactory();
1867
        
1868
        foreach ($formPV as $element) {
1869
            if (isset($element->line_text)) {
1870
                $attr  = $this->getAttributes($element->line_text[0]);
1871
                $element = new Element\Text($attr['name']);
1872
                $element = $this->decorate($element, $attr, $inputFilter);
1873
                $form->add($element);
1874
            }
1875
            if (isset($element->line_password)) {
1876
                $attr = $this->getAttributes($element->line_password[0]);
1877
                $element = new Element\Password($attr['name']);
@@ 1875-1880 (lines=6) @@
1872
                $element = $this->decorate($element, $attr, $inputFilter);
1873
                $form->add($element);
1874
            }
1875
            if (isset($element->line_password)) {
1876
                $attr = $this->getAttributes($element->line_password[0]);
1877
                $element = new Element\Password($attr['name']);
1878
                $element = $this->decorate($element, $attr, $inputFilter);
1879
                $form->add($element);
1880
            }
1881
            if (isset($element->line_hidden)) {
1882
                $attr = $this->getAttributes($element->line_hidden[0]);
1883
                $element = new Element\Hidden($attr['name']);
@@ 1881-1886 (lines=6) @@
1878
                $element = $this->decorate($element, $attr, $inputFilter);
1879
                $form->add($element);
1880
            }
1881
            if (isset($element->line_hidden)) {
1882
                $attr = $this->getAttributes($element->line_hidden[0]);
1883
                $element = new Element\Hidden($attr['name']);
1884
                $element = $this->decorate($element, $attr, $inputFilter);
1885
                $form->add($element);
1886
            }
1887
            if (isset($element->line_email)) {
1888
                $attr = $this->getAttributes($element->line_email[0]);
1889
                $element = new Element\Email($attr['name']);
@@ 1887-1892 (lines=6) @@
1884
                $element = $this->decorate($element, $attr, $inputFilter);
1885
                $form->add($element);
1886
            }
1887
            if (isset($element->line_email)) {
1888
                $attr = $this->getAttributes($element->line_email[0]);
1889
                $element = new Element\Email($attr['name']);
1890
                $element = $this->decorate($element, $attr, $inputFilter);
1891
                $form->add($element);
1892
            }
1893
            if (isset($element->line_radio)) {
1894
                $attr = $this->getAttributes($element->line_radio[0]);
1895
                $element = new Element\Radio($attr['name']);
@@ 1994-1999 (lines=6) @@
1991
                    'allowEmpty' => !$attr['required'],
1992
                )));
1993
            }
1994
            if (isset($element->line_paragraph)) {
1995
                $attr = $this->getAttributes($element->line_paragraph[0]);
1996
                $element = new Element\Textarea($attr['name']);
1997
                $element = $this->decorate($element, $attr, $inputFilter);
1998
                $form->add($element);
1999
            }
2000
            if (isset($element->line_upload)) {
2001
                $attr = $this->getAttributes($element->line_upload[0]);
2002
                $element = new Element\File($attr['name']);