Code Duplication    Length = 3-12 lines in 3 locations

core/db_models/EEM_Base.model.php 2 locations

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

core/EE_Registry.core.php 1 location

@@ 827-837 (lines=11) @@
824
        // don't give up! you gotta...
825
        try {
826
            //does the file exist and can it be read ?
827
            if ( ! $path) {
828
                // so sorry, can't find the file
829
                throw new EE_Error (
830
                    sprintf(
831
                        __('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'),
832
                        trim($type, '.'),
833
                        $class_name,
834
                        '<br />' . implode(',<br />', $file_paths)
835
                    )
836
                );
837
            }
838
            // get the file
839
            require_once($path);
840
            // if the class isn't already declared somewhere