Code Duplication    Length = 6-6 lines in 5 locations

src/PlaygroundGame/Service/Game.php 5 locations

@@ 1773-1778 (lines=6) @@
1770
        $factory = new InputFactory();
1771
        
1772
        foreach ($formPV as $element) {
1773
            if (isset($element->line_text)) {
1774
                $attr  = $this->getAttributes($element->line_text[0]);
1775
                $element = new Element\Text($attr['name']);
1776
                $element = $this->decorate($element, $attr, $inputFilter);
1777
                $form->add($element);
1778
            }
1779
            if (isset($element->line_password)) {
1780
                $attr = $this->getAttributes($element->line_password[0]);
1781
                $element = new Element\Password($attr['name']);
@@ 1779-1784 (lines=6) @@
1776
                $element = $this->decorate($element, $attr, $inputFilter);
1777
                $form->add($element);
1778
            }
1779
            if (isset($element->line_password)) {
1780
                $attr = $this->getAttributes($element->line_password[0]);
1781
                $element = new Element\Password($attr['name']);
1782
                $element = $this->decorate($element, $attr, $inputFilter);
1783
                $form->add($element);
1784
            }
1785
            if (isset($element->line_hidden)) {
1786
                $attr = $this->getAttributes($element->line_hidden[0]);
1787
                $element = new Element\Hidden($attr['name']);
@@ 1785-1790 (lines=6) @@
1782
                $element = $this->decorate($element, $attr, $inputFilter);
1783
                $form->add($element);
1784
            }
1785
            if (isset($element->line_hidden)) {
1786
                $attr = $this->getAttributes($element->line_hidden[0]);
1787
                $element = new Element\Hidden($attr['name']);
1788
                $element = $this->decorate($element, $attr, $inputFilter);
1789
                $form->add($element);
1790
            }
1791
            if (isset($element->line_email)) {
1792
                $attr = $this->getAttributes($element->line_email[0]);
1793
                $element = new Element\Email($attr['name']);
@@ 1791-1796 (lines=6) @@
1788
                $element = $this->decorate($element, $attr, $inputFilter);
1789
                $form->add($element);
1790
            }
1791
            if (isset($element->line_email)) {
1792
                $attr = $this->getAttributes($element->line_email[0]);
1793
                $element = new Element\Email($attr['name']);
1794
                $element = $this->decorate($element, $attr, $inputFilter);
1795
                $form->add($element);
1796
            }
1797
            if (isset($element->line_radio)) {
1798
                $attr = $this->getAttributes($element->line_radio[0]);
1799
                $element = new Element\Radio($attr['name']);
@@ 1898-1903 (lines=6) @@
1895
                    'allowEmpty' => !$attr['required'],
1896
                )));
1897
            }
1898
            if (isset($element->line_paragraph)) {
1899
                $attr = $this->getAttributes($element->line_paragraph[0]);
1900
                $element = new Element\Textarea($attr['name']);
1901
                $element = $this->decorate($element, $attr, $inputFilter);
1902
                $form->add($element);
1903
            }
1904
            if (isset($element->line_upload)) {
1905
                $attr = $this->getAttributes($element->line_upload[0]);
1906
                $element = new Element\File($attr['name']);