Code Duplication    Length = 13-13 lines in 2 locations

module/Cv/src/Cv/Form/EducationFieldset.php 1 location

@@ 139-151 (lines=13) @@
136
     *
137
     * @see \Zend\Form\Form::setData()
138
     */
139
    public function populateValues($data)
140
    {
141
        if (isset($data['currentIndicator'])
142
            && isset($data['endDate'])
143
            && $data['currentIndicator']
144
        ) {
145
            // empty & hide endDate if currentIndicator is checked
146
            $data['endDate'] = '';
147
            $this->get('endDate')->setOption('rowClass', 'hidden');
148
        }
149
        
150
        return parent::populateValues($data);
151
    }
152
}
153

module/Cv/src/Cv/Form/EmploymentFieldset.php 1 location

@@ 96-108 (lines=13) @@
93
    /**
94
     * @see \Zend\Form\Form::setData()
95
     */
96
    public function populateValues($data)
97
    {
98
        if (isset($data['currentIndicator'])
99
            && isset($data['endDate'])
100
            && $data['currentIndicator']
101
        ) {
102
            // empty & hide endDate if currentIndicator is checked
103
            $data['endDate'] = '';
104
            $this->get('endDate')->setOption('rowClass', 'hidden');
105
        }
106
    
107
        return parent::populateValues($data);
108
    }
109
}
110