Code Duplication    Length = 11-12 lines in 2 locations

src/form/Form.php 2 locations

@@ 424-435 (lines=12) @@
421
     *
422
     * @return string
423
     */
424
    public function listBoxField(IFormModel $model, $property, array $options = [])
425
    {
426
        $element = $this->getField($model, $property);
427
        $options['id'] = $element['id'];
428
        $options['selected'] = $element['value'];
429
430
        if (empty($options['size'])) {
431
            $options['size'] = 3;
432
        }
433
434
        return Html::listBox($element['name'], $this->getBlock('elements', $options), $options);
435
    }
436
437
    /**
438
     * Render text field row
@@ 470-480 (lines=11) @@
467
     *
468
     * @return string
469
     */
470
    public function dropDownListField(IFormModel $model, $property, array $options = [])
471
    {
472
        $element = $this->getField($model, $property);
473
        $options['id'] = $element['id'];
474
475
        if (!empty($element['value'])) {
476
            $options['selected'] = $element['value'];
477
        }
478
479
        return Html::dropDownList($element['name'], $this->getBlock('elements', $options), $options);
480
    }
481
482
    /**
483
     * Render text field row