Code Duplication    Length = 6-6 lines in 5 locations

src/PlaygroundGame/Service/Game.php 5 locations

@@ 1856-1861 (lines=6) @@
1853
        $factory = new InputFactory();
1854
        
1855
        foreach ($formPV as $element) {
1856
            if (isset($element->line_text)) {
1857
                $attr  = $this->getAttributes($element->line_text[0]);
1858
                $element = new Element\Text($attr['name']);
1859
                $element = $this->decorate($element, $attr, $inputFilter);
1860
                $form->add($element);
1861
            }
1862
            if (isset($element->line_password)) {
1863
                $attr = $this->getAttributes($element->line_password[0]);
1864
                $element = new Element\Password($attr['name']);
@@ 1862-1867 (lines=6) @@
1859
                $element = $this->decorate($element, $attr, $inputFilter);
1860
                $form->add($element);
1861
            }
1862
            if (isset($element->line_password)) {
1863
                $attr = $this->getAttributes($element->line_password[0]);
1864
                $element = new Element\Password($attr['name']);
1865
                $element = $this->decorate($element, $attr, $inputFilter);
1866
                $form->add($element);
1867
            }
1868
            if (isset($element->line_hidden)) {
1869
                $attr = $this->getAttributes($element->line_hidden[0]);
1870
                $element = new Element\Hidden($attr['name']);
@@ 1868-1873 (lines=6) @@
1865
                $element = $this->decorate($element, $attr, $inputFilter);
1866
                $form->add($element);
1867
            }
1868
            if (isset($element->line_hidden)) {
1869
                $attr = $this->getAttributes($element->line_hidden[0]);
1870
                $element = new Element\Hidden($attr['name']);
1871
                $element = $this->decorate($element, $attr, $inputFilter);
1872
                $form->add($element);
1873
            }
1874
            if (isset($element->line_email)) {
1875
                $attr = $this->getAttributes($element->line_email[0]);
1876
                $element = new Element\Email($attr['name']);
@@ 1874-1879 (lines=6) @@
1871
                $element = $this->decorate($element, $attr, $inputFilter);
1872
                $form->add($element);
1873
            }
1874
            if (isset($element->line_email)) {
1875
                $attr = $this->getAttributes($element->line_email[0]);
1876
                $element = new Element\Email($attr['name']);
1877
                $element = $this->decorate($element, $attr, $inputFilter);
1878
                $form->add($element);
1879
            }
1880
            if (isset($element->line_radio)) {
1881
                $attr = $this->getAttributes($element->line_radio[0]);
1882
                $element = new Element\Radio($attr['name']);
@@ 1981-1986 (lines=6) @@
1978
                    'allowEmpty' => !$attr['required'],
1979
                )));
1980
            }
1981
            if (isset($element->line_paragraph)) {
1982
                $attr = $this->getAttributes($element->line_paragraph[0]);
1983
                $element = new Element\Textarea($attr['name']);
1984
                $element = $this->decorate($element, $attr, $inputFilter);
1985
                $form->add($element);
1986
            }
1987
            if (isset($element->line_upload)) {
1988
                $attr = $this->getAttributes($element->line_upload[0]);
1989
                $element = new Element\File($attr['name']);