Code Duplication    Length = 6-6 lines in 5 locations

src/PlaygroundGame/Service/Game.php 5 locations

@@ 1781-1786 (lines=6) @@
1778
        $factory = new InputFactory();
1779
        
1780
        foreach ($formPV as $element) {
1781
            if (isset($element->line_text)) {
1782
                $attr  = $this->getAttributes($element->line_text[0]);
1783
                $element = new Element\Text($attr['name']);
1784
                $element = $this->decorate($element, $attr, $inputFilter);
1785
                $form->add($element);
1786
            }
1787
            if (isset($element->line_password)) {
1788
                $attr = $this->getAttributes($element->line_password[0]);
1789
                $element = new Element\Password($attr['name']);
@@ 1787-1792 (lines=6) @@
1784
                $element = $this->decorate($element, $attr, $inputFilter);
1785
                $form->add($element);
1786
            }
1787
            if (isset($element->line_password)) {
1788
                $attr = $this->getAttributes($element->line_password[0]);
1789
                $element = new Element\Password($attr['name']);
1790
                $element = $this->decorate($element, $attr, $inputFilter);
1791
                $form->add($element);
1792
            }
1793
            if (isset($element->line_hidden)) {
1794
                $attr = $this->getAttributes($element->line_hidden[0]);
1795
                $element = new Element\Hidden($attr['name']);
@@ 1793-1798 (lines=6) @@
1790
                $element = $this->decorate($element, $attr, $inputFilter);
1791
                $form->add($element);
1792
            }
1793
            if (isset($element->line_hidden)) {
1794
                $attr = $this->getAttributes($element->line_hidden[0]);
1795
                $element = new Element\Hidden($attr['name']);
1796
                $element = $this->decorate($element, $attr, $inputFilter);
1797
                $form->add($element);
1798
            }
1799
            if (isset($element->line_email)) {
1800
                $attr = $this->getAttributes($element->line_email[0]);
1801
                $element = new Element\Email($attr['name']);
@@ 1799-1804 (lines=6) @@
1796
                $element = $this->decorate($element, $attr, $inputFilter);
1797
                $form->add($element);
1798
            }
1799
            if (isset($element->line_email)) {
1800
                $attr = $this->getAttributes($element->line_email[0]);
1801
                $element = new Element\Email($attr['name']);
1802
                $element = $this->decorate($element, $attr, $inputFilter);
1803
                $form->add($element);
1804
            }
1805
            if (isset($element->line_radio)) {
1806
                $attr = $this->getAttributes($element->line_radio[0]);
1807
                $element = new Element\Radio($attr['name']);
@@ 1906-1911 (lines=6) @@
1903
                    'allowEmpty' => !$attr['required'],
1904
                )));
1905
            }
1906
            if (isset($element->line_paragraph)) {
1907
                $attr = $this->getAttributes($element->line_paragraph[0]);
1908
                $element = new Element\Textarea($attr['name']);
1909
                $element = $this->decorate($element, $attr, $inputFilter);
1910
                $form->add($element);
1911
            }
1912
            if (isset($element->line_upload)) {
1913
                $attr = $this->getAttributes($element->line_upload[0]);
1914
                $element = new Element\File($attr['name']);