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

@@ 865-875 (lines=11) @@
862
        // don't give up! you gotta...
863
        try {
864
            //does the file exist and can it be read ?
865
            if ( ! $path) {
866
                // so sorry, can't find the file
867
                throw new EE_Error (
868
                    sprintf(
869
                        __('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'),
870
                        trim($type, '.'),
871
                        $class_name,
872
                        '<br />' . implode(',<br />', $file_paths)
873
                    )
874
                );
875
            }
876
            // get the file
877
            require_once($path);
878
            // if the class isn't already declared somewhere