Code Duplication    Length = 9-10 lines in 2 locations

main/inc/lib/formvalidator/FormValidator.class.php 2 locations

@@ 674-683 (lines=10) @@
671
     *
672
     * @return HTML_QuickForm_group
673
     */
674
    public function addCheckBoxGroup($name, $label, $options = array(), $attributes = array())
675
    {
676
        $group = array();
677
        foreach ($options as $value => $text) {
678
            $attributes['value'] = $value;
679
            $group[] = $this->createElement('checkbox', $value, null, $text, $attributes);
680
        }
681
682
        return $this->addGroup($group, $name, $label);
683
    }
684
685
    /**
686
     * @param string $name
@@ 693-701 (lines=9) @@
690
     *
691
     * @return HTML_QuickForm_radio
692
     */
693
    public function addRadio($name, $label, $options = array(), $attributes = array())
694
    {
695
        $group = array();
696
        foreach ($options as $key => $value) {
697
            $group[] = $this->createElement('radio', null, null, $value, $key, $attributes);
698
        }
699
700
        return $this->addGroup($group, $name, $label);
701
    }
702
703
    /**
704
     * @param string $name