Code Duplication    Length = 3-12 lines in 3 locations

core/db_models/EEM_Base.model.php 2 locations

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

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