Code Duplication    Length = 7-7 lines in 20 locations

micro/form/Form.php 20 locations

@@ 90-96 (lines=7) @@
87
     *
88
     * @return string
89
     */
90
    public function buttonField(IFormModel $model, $property, array $options = [])
91
    {
92
        $element = $this->getField($model, $property);
93
        $options['id'] = $element['id'];
94
95
        return Html::buttonField($element['name'], $element['value'], $options);
96
    }
97
98
    /**
99
     * Render radio field tag
@@ 109-115 (lines=7) @@
106
     *
107
     * @return string
108
     */
109
    public function radioField(IFormModel $model, $property, array $options = [])
110
    {
111
        $element = $this->getField($model, $property);
112
        $options['id'] = $element['id'];
113
114
        return Html::radioField($element['name'], $element['value'], $options);
115
    }
116
117
    /**
118
     * Render text field row
@@ 173-179 (lines=7) @@
170
     *
171
     * @return string
172
     */
173
    public function textField(IFormModel $model, $property, array $options = [])
174
    {
175
        $element = $this->getField($model, $property);
176
        $options['id'] = $element['id'];
177
178
        return Html::textField($element['name'], $element['value'], $options);
179
    }
180
181
    /**
182
     * Render file field row
@@ 214-220 (lines=7) @@
211
     *
212
     * @return string
213
     */
214
    public function fileField(IFormModel $model, $property, array $options = [])
215
    {
216
        $element = $this->getField($model, $property);
217
        $options['id'] = $element['id'];
218
219
        return Html::fileField($element['name'], $element['value'], $options);
220
    }
221
222
    /**
223
     * Render image field row
@@ 297-303 (lines=7) @@
294
     *
295
     * @return string
296
     */
297
    public function passwordField(IFormModel $model, $property, array $options = [])
298
    {
299
        $element = $this->getField($model, $property);
300
        $options['id'] = $element['id'];
301
302
        return Html::passwordField($element['name'], $element['value'], $options);
303
    }
304
305
    /**
306
     * Render textArea field row
@@ 338-344 (lines=7) @@
335
     *
336
     * @return string
337
     */
338
    public function textAreaField(IFormModel $model, $property, array $options = [])
339
    {
340
        $element = $this->getField($model, $property);
341
        $options['id'] = $element['id'];
342
343
        return Html::textArea($element['name'], $element['value'], $options);
344
    }
345
346
    /**
347
     * Render checkbox field row
@@ 379-385 (lines=7) @@
376
     *
377
     * @return string
378
     */
379
    public function checkBoxField(IFormModel $model, $property, array $options = [])
380
    {
381
        $element = $this->getField($model, $property);
382
        $options['id'] = $element['id'];
383
384
        return Html::checkBoxField($element['name'], $element['value'], $options);
385
    }
386
387
    // Lists
388
@@ 599-605 (lines=7) @@
596
     *
597
     * @return string
598
     */
599
    public function colorField(IFormModel $model, $property, array $options = [])
600
    {
601
        $element = $this->getField($model, $property);
602
        $options['id'] = $element['id'];
603
604
        return Html::colorField($element['name'], $element['value'], $options);
605
    }
606
607
    /**
608
     * Render number field row
@@ 640-646 (lines=7) @@
637
     *
638
     * @return string
639
     */
640
    public function dateField(IFormModel $model, $property, array $options = [])
641
    {
642
        $element = $this->getField($model, $property);
643
        $options['id'] = $element['id'];
644
645
        return Html::dateField($element['name'], $element['value'], $options);
646
    }
647
648
    /**
649
     * Render datetime field row
@@ 681-687 (lines=7) @@
678
     *
679
     * @return string
680
     */
681
    public function dateTimeField(IFormModel $model, $property, array $options = [])
682
    {
683
        $element = $this->getField($model, $property);
684
        $options['id'] = $element['id'];
685
686
        return Html::datetimeField($element['name'], $element['value'], $options);
687
    }
688
689
    /**
690
     * Render datetime-local field row
@@ 722-728 (lines=7) @@
719
     *
720
     * @return string
721
     */
722
    public function dateTimeLocalField(IFormModel $model, $property, array $options = [])
723
    {
724
        $element = $this->getField($model, $property);
725
        $options['id'] = $element['id'];
726
727
        return Html::datetimeLocalField($element['name'], $element['value'], $options);
728
    }
729
730
    /**
731
     * Render email field row
@@ 763-769 (lines=7) @@
760
     *
761
     * @return string
762
     */
763
    public function emailField(IFormModel $model, $property, array $options = [])
764
    {
765
        $element = $this->getField($model, $property);
766
        $options['id'] = $element['id'];
767
768
        return Html::emailField($element['name'], $element['value'], $options);
769
    }
770
771
    /**
772
     * Render number field row
@@ 804-810 (lines=7) @@
801
     *
802
     * @return string
803
     */
804
    public function numberField(IFormModel $model, $property, array $options = [])
805
    {
806
        $element = $this->getField($model, $property);
807
        $options['id'] = $element['id'];
808
809
        return Html::numberField($element['name'], $element['value'], $options);
810
    }
811
812
    /**
813
     * Render range field row
@@ 845-851 (lines=7) @@
842
     *
843
     * @return string
844
     */
845
    public function rangeField(IFormModel $model, $property, array $options = [])
846
    {
847
        $element = $this->getField($model, $property);
848
        $options['id'] = $element['id'];
849
850
        return Html::rangeField($element['name'], $element['value'], $options);
851
    }
852
853
    /**
854
     * Render search field row
@@ 886-892 (lines=7) @@
883
     *
884
     * @return string
885
     */
886
    public function searchField(IFormModel $model, $property, array $options = [])
887
    {
888
        $element = $this->getField($model, $property);
889
        $options['id'] = $element['id'];
890
891
        return Html::searchField($element['name'], $element['value'], $options);
892
    }
893
894
    /**
895
     * Render telephone field row
@@ 927-933 (lines=7) @@
924
     *
925
     * @return string
926
     */
927
    public function telField(IFormModel $model, $property, array $options = [])
928
    {
929
        $element = $this->getField($model, $property);
930
        $options['id'] = $element['id'];
931
932
        return Html::telField($element['name'], $element['value'], $options);
933
    }
934
935
    /**
936
     * Render time field row
@@ 968-974 (lines=7) @@
965
     *
966
     * @return string
967
     */
968
    public function timeField(IFormModel $model, $property, array $options = [])
969
    {
970
        $element = $this->getField($model, $property);
971
        $options['id'] = $element['id'];
972
973
        return Html::timeField($element['name'], $element['value'], $options);
974
    }
975
976
    /**
977
     * Render url field row
@@ 1009-1015 (lines=7) @@
1006
     *
1007
     * @return string
1008
     */
1009
    public function urlField(IFormModel $model, $property, array $options = [])
1010
    {
1011
        $element = $this->getField($model, $property);
1012
        $options['id'] = $element['id'];
1013
1014
        return Html::urlField($element['name'], $element['value'], $options);
1015
    }
1016
1017
    /**
1018
     * Render month field row
@@ 1050-1056 (lines=7) @@
1047
     *
1048
     * @return string
1049
     */
1050
    public function monthField(IFormModel $model, $property, array $options = [])
1051
    {
1052
        $element = $this->getField($model, $property);
1053
        $options['id'] = $element['id'];
1054
1055
        return Html::monthField($element['name'], $element['value'], $options);
1056
    }
1057
1058
    /**
1059
     * Render week field row
@@ 1091-1097 (lines=7) @@
1088
     *
1089
     * @return string
1090
     */
1091
    public function weekField(IFormModel $model, $property, array $options = [])
1092
    {
1093
        $element = $this->getField($model, $property);
1094
        $options['id'] = $element['id'];
1095
1096
        return Html::weekField($element['name'], $element['value'], $options);
1097
    }
1098
}
1099