Code Duplication    Length = 11-12 lines in 2 locations

micro/form/Form.php 2 locations

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