Code Duplication    Length = 6-6 lines in 5 locations

src/Service/Game.php 5 locations

@@ 2275-2280 (lines=6) @@
2272
        $factory = new InputFactory();
2273
        
2274
        foreach ($formPV as $element) {
2275
            if (isset($element->line_text)) {
2276
                $attr  = $this->getAttributes($element->line_text[0]);
2277
                $element = new Element\Text($attr['name']);
2278
                $element = $this->decorate($element, $attr, $inputFilter);
2279
                $form->add($element);
2280
            }
2281
            if (isset($element->line_password)) {
2282
                $attr = $this->getAttributes($element->line_password[0]);
2283
                $element = new Element\Password($attr['name']);
@@ 2281-2286 (lines=6) @@
2278
                $element = $this->decorate($element, $attr, $inputFilter);
2279
                $form->add($element);
2280
            }
2281
            if (isset($element->line_password)) {
2282
                $attr = $this->getAttributes($element->line_password[0]);
2283
                $element = new Element\Password($attr['name']);
2284
                $element = $this->decorate($element, $attr, $inputFilter);
2285
                $form->add($element);
2286
            }
2287
            if (isset($element->line_hidden)) {
2288
                $attr = $this->getAttributes($element->line_hidden[0]);
2289
                $element = new Element\Hidden($attr['name']);
@@ 2287-2292 (lines=6) @@
2284
                $element = $this->decorate($element, $attr, $inputFilter);
2285
                $form->add($element);
2286
            }
2287
            if (isset($element->line_hidden)) {
2288
                $attr = $this->getAttributes($element->line_hidden[0]);
2289
                $element = new Element\Hidden($attr['name']);
2290
                $element = $this->decorate($element, $attr, $inputFilter);
2291
                $form->add($element);
2292
            }
2293
            if (isset($element->line_email)) {
2294
                $attr = $this->getAttributes($element->line_email[0]);
2295
                $element = new Element\Email($attr['name']);
@@ 2293-2298 (lines=6) @@
2290
                $element = $this->decorate($element, $attr, $inputFilter);
2291
                $form->add($element);
2292
            }
2293
            if (isset($element->line_email)) {
2294
                $attr = $this->getAttributes($element->line_email[0]);
2295
                $element = new Element\Email($attr['name']);
2296
                $element = $this->decorate($element, $attr, $inputFilter);
2297
                $form->add($element);
2298
            }
2299
            if (isset($element->line_radio)) {
2300
                $attr = $this->getAttributes($element->line_radio[0]);
2301
                $element = new Element\Radio($attr['name']);
@@ 2400-2405 (lines=6) @@
2397
                    'allowEmpty' => !$attr['required'],
2398
                )));
2399
            }
2400
            if (isset($element->line_paragraph)) {
2401
                $attr = $this->getAttributes($element->line_paragraph[0]);
2402
                $element = new Element\Textarea($attr['name']);
2403
                $element = $this->decorate($element, $attr, $inputFilter);
2404
                $form->add($element);
2405
            }
2406
            if (isset($element->line_upload)) {
2407
                $attr = $this->getAttributes($element->line_upload[0]);
2408
                $element = new Element\File($attr['name']);