Code Duplication    Length = 6-6 lines in 5 locations

src/PlaygroundGame/Service/Game.php 5 locations

@@ 1793-1798 (lines=6) @@
1790
        $factory = new InputFactory();
1791
        
1792
        foreach ($formPV as $element) {
1793
            if (isset($element->line_text)) {
1794
                $attr  = $this->getAttributes($element->line_text[0]);
1795
                $element = new Element\Text($attr['name']);
1796
                $element = $this->decorate($element, $attr, $inputFilter);
1797
                $form->add($element);
1798
            }
1799
            if (isset($element->line_password)) {
1800
                $attr = $this->getAttributes($element->line_password[0]);
1801
                $element = new Element\Password($attr['name']);
@@ 1799-1804 (lines=6) @@
1796
                $element = $this->decorate($element, $attr, $inputFilter);
1797
                $form->add($element);
1798
            }
1799
            if (isset($element->line_password)) {
1800
                $attr = $this->getAttributes($element->line_password[0]);
1801
                $element = new Element\Password($attr['name']);
1802
                $element = $this->decorate($element, $attr, $inputFilter);
1803
                $form->add($element);
1804
            }
1805
            if (isset($element->line_hidden)) {
1806
                $attr = $this->getAttributes($element->line_hidden[0]);
1807
                $element = new Element\Hidden($attr['name']);
@@ 1805-1810 (lines=6) @@
1802
                $element = $this->decorate($element, $attr, $inputFilter);
1803
                $form->add($element);
1804
            }
1805
            if (isset($element->line_hidden)) {
1806
                $attr = $this->getAttributes($element->line_hidden[0]);
1807
                $element = new Element\Hidden($attr['name']);
1808
                $element = $this->decorate($element, $attr, $inputFilter);
1809
                $form->add($element);
1810
            }
1811
            if (isset($element->line_email)) {
1812
                $attr = $this->getAttributes($element->line_email[0]);
1813
                $element = new Element\Email($attr['name']);
@@ 1811-1816 (lines=6) @@
1808
                $element = $this->decorate($element, $attr, $inputFilter);
1809
                $form->add($element);
1810
            }
1811
            if (isset($element->line_email)) {
1812
                $attr = $this->getAttributes($element->line_email[0]);
1813
                $element = new Element\Email($attr['name']);
1814
                $element = $this->decorate($element, $attr, $inputFilter);
1815
                $form->add($element);
1816
            }
1817
            if (isset($element->line_radio)) {
1818
                $attr = $this->getAttributes($element->line_radio[0]);
1819
                $element = new Element\Radio($attr['name']);
@@ 1918-1923 (lines=6) @@
1915
                    'allowEmpty' => !$attr['required'],
1916
                )));
1917
            }
1918
            if (isset($element->line_paragraph)) {
1919
                $attr = $this->getAttributes($element->line_paragraph[0]);
1920
                $element = new Element\Textarea($attr['name']);
1921
                $element = $this->decorate($element, $attr, $inputFilter);
1922
                $form->add($element);
1923
            }
1924
            if (isset($element->line_upload)) {
1925
                $attr = $this->getAttributes($element->line_upload[0]);
1926
                $element = new Element\File($attr['name']);