Code Duplication    Length = 6-6 lines in 5 locations

src/PlaygroundGame/Service/Game.php 5 locations

@@ 1888-1893 (lines=6) @@
1885
        $factory = new InputFactory();
1886
        
1887
        foreach ($formPV as $element) {
1888
            if (isset($element->line_text)) {
1889
                $attr  = $this->getAttributes($element->line_text[0]);
1890
                $element = new Element\Text($attr['name']);
1891
                $element = $this->decorate($element, $attr, $inputFilter);
1892
                $form->add($element);
1893
            }
1894
            if (isset($element->line_password)) {
1895
                $attr = $this->getAttributes($element->line_password[0]);
1896
                $element = new Element\Password($attr['name']);
@@ 1894-1899 (lines=6) @@
1891
                $element = $this->decorate($element, $attr, $inputFilter);
1892
                $form->add($element);
1893
            }
1894
            if (isset($element->line_password)) {
1895
                $attr = $this->getAttributes($element->line_password[0]);
1896
                $element = new Element\Password($attr['name']);
1897
                $element = $this->decorate($element, $attr, $inputFilter);
1898
                $form->add($element);
1899
            }
1900
            if (isset($element->line_hidden)) {
1901
                $attr = $this->getAttributes($element->line_hidden[0]);
1902
                $element = new Element\Hidden($attr['name']);
@@ 1900-1905 (lines=6) @@
1897
                $element = $this->decorate($element, $attr, $inputFilter);
1898
                $form->add($element);
1899
            }
1900
            if (isset($element->line_hidden)) {
1901
                $attr = $this->getAttributes($element->line_hidden[0]);
1902
                $element = new Element\Hidden($attr['name']);
1903
                $element = $this->decorate($element, $attr, $inputFilter);
1904
                $form->add($element);
1905
            }
1906
            if (isset($element->line_email)) {
1907
                $attr = $this->getAttributes($element->line_email[0]);
1908
                $element = new Element\Email($attr['name']);
@@ 1906-1911 (lines=6) @@
1903
                $element = $this->decorate($element, $attr, $inputFilter);
1904
                $form->add($element);
1905
            }
1906
            if (isset($element->line_email)) {
1907
                $attr = $this->getAttributes($element->line_email[0]);
1908
                $element = new Element\Email($attr['name']);
1909
                $element = $this->decorate($element, $attr, $inputFilter);
1910
                $form->add($element);
1911
            }
1912
            if (isset($element->line_radio)) {
1913
                $attr = $this->getAttributes($element->line_radio[0]);
1914
                $element = new Element\Radio($attr['name']);
@@ 2013-2018 (lines=6) @@
2010
                    'allowEmpty' => !$attr['required'],
2011
                )));
2012
            }
2013
            if (isset($element->line_paragraph)) {
2014
                $attr = $this->getAttributes($element->line_paragraph[0]);
2015
                $element = new Element\Textarea($attr['name']);
2016
                $element = $this->decorate($element, $attr, $inputFilter);
2017
                $form->add($element);
2018
            }
2019
            if (isset($element->line_upload)) {
2020
                $attr = $this->getAttributes($element->line_upload[0]);
2021
                $element = new Element\File($attr['name']);