Code Duplication    Length = 3-12 lines in 3 locations

core/db_models/EEM_Base.model.php 2 locations

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

core/EE_Registry.core.php 1 location

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