Code Duplication    Length = 16-17 lines in 2 locations

core/db_models/EEM_Event.model.php 2 locations

@@ 324-340 (lines=17) @@
321
     *
322
     * @return        array
323
     */
324
    public function get_questions_in_groups($QSG_IDs = '')
325
    {
326
        
327
        if (empty($QSG_IDs)) {
328
            EE_Error::add_error(__('An error occurred. No Question Group IDs were received.', 'event_espresso'),
329
                __FILE__, __FUNCTION__, __LINE__);
330
            
331
            return false;
332
        }
333
        
334
        return EE_Registry::instance()->load_model('Question')->get_all(array(
335
            array(
336
                'Question_Group.QSG_ID' => array('IN', $QSG_IDs),
337
                'QST_deleted'           => false,
338
                'QST_admin_only'        => is_admin()
339
            ),
340
            'order_by' => 'QST_order'
341
        ));
342
        
343
    }
@@ 355-370 (lines=16) @@
352
     *
353
     * @return        array
354
     */
355
    public function get_options_for_question($QST_IDs)
356
    {
357
        
358
        if (empty($QST_IDs)) {
359
            EE_Error::add_error(__('An error occurred. No Question IDs were received.', 'event_espresso'), __FILE__,
360
                __FUNCTION__, __LINE__);
361
            
362
            return false;
363
        }
364
        
365
        return EE_Registry::instance()->load_model('Question_Option')->get_all(array(
366
            array(
367
                'Question.QST_ID' => array('IN', $QST_IDs),
368
                'QSO_deleted'     => false
369
            ),
370
            'order_by' => 'QSO_ID'
371
        ));
372
        
373
    }