Code Duplication    Length = 9-9 lines in 2 locations

core/db_models/EEM_Event.model.php 2 locations

@@ 241-249 (lines=9) @@
238
     *
239
     * @return        array
240
     */
241
    public function get_all_event_question_groups($EVT_ID = 0)
242
    {
243
        if ( ! isset($EVT_ID) || ! absint($EVT_ID)) {
244
            EE_Error::add_error(__('An error occurred. No Event Question Groups could be retrieved because an Event ID was not received.',
245
                'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
246
            
247
            return false;
248
        }
249
        
250
        return EE_Registry::instance()->load_model('Event_Question_Group')->get_all(array(
251
            array('EVT_ID' => $EVT_ID)
252
        ));
@@ 266-274 (lines=9) @@
263
     *
264
     * @return        array
265
     */
266
    public function get_event_question_groups($EVT_ID = 0, $for_primary_attendee = true)
267
    {
268
        if ( ! isset($EVT_ID) || ! absint($EVT_ID)) {
269
            EE_Error::add_error(__('An error occurred. No Event Question Groups could be retrieved because an Event ID was not received.',
270
                'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
271
            
272
            return false;
273
        }
274
        
275
        return EE_Registry::instance()->load_model('Event_Question_Group')->get_all(array(
276
            array('EVT_ID' => $EVT_ID, 'EQG_primary' => $for_primary_attendee)
277
        ));