Code Duplication    Length = 6-6 lines in 5 locations

src/PlaygroundGame/Service/Game.php 5 locations

@@ 1868-1873 (lines=6) @@
1865
        $factory = new InputFactory();
1866
        
1867
        foreach ($formPV as $element) {
1868
            if (isset($element->line_text)) {
1869
                $attr  = $this->getAttributes($element->line_text[0]);
1870
                $element = new Element\Text($attr['name']);
1871
                $element = $this->decorate($element, $attr, $inputFilter);
1872
                $form->add($element);
1873
            }
1874
            if (isset($element->line_password)) {
1875
                $attr = $this->getAttributes($element->line_password[0]);
1876
                $element = new Element\Password($attr['name']);
@@ 1874-1879 (lines=6) @@
1871
                $element = $this->decorate($element, $attr, $inputFilter);
1872
                $form->add($element);
1873
            }
1874
            if (isset($element->line_password)) {
1875
                $attr = $this->getAttributes($element->line_password[0]);
1876
                $element = new Element\Password($attr['name']);
1877
                $element = $this->decorate($element, $attr, $inputFilter);
1878
                $form->add($element);
1879
            }
1880
            if (isset($element->line_hidden)) {
1881
                $attr = $this->getAttributes($element->line_hidden[0]);
1882
                $element = new Element\Hidden($attr['name']);
@@ 1880-1885 (lines=6) @@
1877
                $element = $this->decorate($element, $attr, $inputFilter);
1878
                $form->add($element);
1879
            }
1880
            if (isset($element->line_hidden)) {
1881
                $attr = $this->getAttributes($element->line_hidden[0]);
1882
                $element = new Element\Hidden($attr['name']);
1883
                $element = $this->decorate($element, $attr, $inputFilter);
1884
                $form->add($element);
1885
            }
1886
            if (isset($element->line_email)) {
1887
                $attr = $this->getAttributes($element->line_email[0]);
1888
                $element = new Element\Email($attr['name']);
@@ 1886-1891 (lines=6) @@
1883
                $element = $this->decorate($element, $attr, $inputFilter);
1884
                $form->add($element);
1885
            }
1886
            if (isset($element->line_email)) {
1887
                $attr = $this->getAttributes($element->line_email[0]);
1888
                $element = new Element\Email($attr['name']);
1889
                $element = $this->decorate($element, $attr, $inputFilter);
1890
                $form->add($element);
1891
            }
1892
            if (isset($element->line_radio)) {
1893
                $attr = $this->getAttributes($element->line_radio[0]);
1894
                $element = new Element\Radio($attr['name']);
@@ 1993-1998 (lines=6) @@
1990
                    'allowEmpty' => !$attr['required'],
1991
                )));
1992
            }
1993
            if (isset($element->line_paragraph)) {
1994
                $attr = $this->getAttributes($element->line_paragraph[0]);
1995
                $element = new Element\Textarea($attr['name']);
1996
                $element = $this->decorate($element, $attr, $inputFilter);
1997
                $form->add($element);
1998
            }
1999
            if (isset($element->line_upload)) {
2000
                $attr = $this->getAttributes($element->line_upload[0]);
2001
                $element = new Element\File($attr['name']);