Code Duplication    Length = 3-12 lines in 3 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 3470-3472 (lines=3) @@
3467
        $where_query_params = array()
3468
    ) {
3469
        $allowed_used_default_where_conditions_values = EEM_Base::valid_default_where_conditions();
3470
        if (! in_array($use_default_where_conditions, $allowed_used_default_where_conditions_values)) {
3471
            throw new EE_Error(sprintf(__("You passed an invalid value to the query parameter 'default_where_conditions' of '%s'. Allowed values are %s",
3472
                "event_espresso"), $use_default_where_conditions,
3473
                implode(", ", $allowed_used_default_where_conditions_values)));
3474
        }
3475
        $universal_query_params = array();
@@ 5792-5803 (lines=12) @@
5789
    static public function verify_is_valid_cap_context($context)
5790
    {
5791
        $valid_cap_contexts = EEM_Base::valid_cap_contexts();
5792
        if (in_array($context, $valid_cap_contexts)) {
5793
            return true;
5794
        } else {
5795
            throw new EE_Error(
5796
                sprintf(
5797
                    __('Context "%1$s" passed into model "%2$s" is not a valid context. They are: %3$s',
5798
                        'event_espresso'),
5799
                    $context,
5800
                    'EEM_Base',
5801
                    implode(',', $valid_cap_contexts)
5802
                )
5803
            );
5804
        }
5805
    }
5806

core/EE_Registry.core.php 1 location

@@ 871-881 (lines=11) @@
868
        // don't give up! you gotta...
869
        try {
870
            //does the file exist and can it be read ?
871
            if ( ! $path) {
872
                // so sorry, can't find the file
873
                throw new EE_Error (
874
                    sprintf(
875
                        __('The %1$s file %2$s could not be located or is not readable due to file permissions. Please ensure that the following filepath(s) are correct: %3$s', 'event_espresso'),
876
                        trim($type, '.'),
877
                        $class_name,
878
                        '<br />' . implode(',<br />', $file_paths)
879
                    )
880
                );
881
            }
882
            // get the file
883
            require_once($path);
884
            // if the class isn't already declared somewhere