Code Duplication    Length = 6-6 lines in 5 locations

src/PlaygroundCore/Service/Formgen.php 5 locations

@@ 195-200 (lines=6) @@
192
        $factory = new InputFactory();
193
194
        foreach ($formPV as $element) {
195
            if (isset($element->line_text)) {
196
                $attr  = $this->getAttributes($element->line_text[0]);
197
                $element = new Element\Text($attr['name']);
198
                $element = $this->decorate($element, $attr, $inputFilter);
199
                $form->add($element);
200
            }
201
            if (isset($element->line_password)) {
202
                $attr = $this->getAttributes($element->line_password[0]);
203
                $element = new Element\Password($attr['name']);
@@ 201-206 (lines=6) @@
198
                $element = $this->decorate($element, $attr, $inputFilter);
199
                $form->add($element);
200
            }
201
            if (isset($element->line_password)) {
202
                $attr = $this->getAttributes($element->line_password[0]);
203
                $element = new Element\Password($attr['name']);
204
                $element = $this->decorate($element, $attr, $inputFilter);
205
                $form->add($element);
206
            }
207
            if (isset($element->line_hidden)) {
208
                $attr = $this->getAttributes($element->line_hidden[0]);
209
                $element = new Element\Hidden($attr['name']);
@@ 207-212 (lines=6) @@
204
                $element = $this->decorate($element, $attr, $inputFilter);
205
                $form->add($element);
206
            }
207
            if (isset($element->line_hidden)) {
208
                $attr = $this->getAttributes($element->line_hidden[0]);
209
                $element = new Element\Hidden($attr['name']);
210
                $element = $this->decorate($element, $attr, $inputFilter);
211
                $form->add($element);
212
            }
213
            if (isset($element->line_email)) {
214
                $attr = $this->getAttributes($element->line_email[0]);
215
                $element = new Element\Email($attr['name']);
@@ 213-218 (lines=6) @@
210
                $element = $this->decorate($element, $attr, $inputFilter);
211
                $form->add($element);
212
            }
213
            if (isset($element->line_email)) {
214
                $attr = $this->getAttributes($element->line_email[0]);
215
                $element = new Element\Email($attr['name']);
216
                $element = $this->decorate($element, $attr, $inputFilter);
217
                $form->add($element);
218
            }
219
            if (isset($element->line_radio)) {
220
                $attr = $this->getAttributes($element->line_radio[0]);
221
                $element = new Element\Radio($attr['name']);
@@ 320-325 (lines=6) @@
317
                    'allowEmpty' => !$attr['required'],
318
                )));
319
            }
320
            if (isset($element->line_paragraph)) {
321
                $attr = $this->getAttributes($element->line_paragraph[0]);
322
                $element = new Element\Textarea($attr['name']);
323
                $element = $this->decorate($element, $attr, $inputFilter);
324
                $form->add($element);
325
            }
326
            if (isset($element->line_upload)) {
327
                $attr = $this->getAttributes($element->line_upload[0]);
328
                $element = new Element\File($attr['name']);