Code Duplication    Length = 3-12 lines in 3 locations

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

core/db_models/EEM_Base.model.php 2 locations

@@ 3514-3516 (lines=3) @@
3511
        $where_query_params = array()
3512
    ) {
3513
        $allowed_used_default_where_conditions_values = EEM_Base::valid_default_where_conditions();
3514
        if (! in_array($use_default_where_conditions, $allowed_used_default_where_conditions_values)) {
3515
            throw new EE_Error(sprintf(__("You passed an invalid value to the query parameter 'default_where_conditions' of '%s'. Allowed values are %s",
3516
                "event_espresso"), $use_default_where_conditions,
3517
                implode(", ", $allowed_used_default_where_conditions_values)));
3518
        }
3519
        $universal_query_params = array();
@@ 5836-5847 (lines=12) @@
5833
    static public function verify_is_valid_cap_context($context)
5834
    {
5835
        $valid_cap_contexts = EEM_Base::valid_cap_contexts();
5836
        if (in_array($context, $valid_cap_contexts)) {
5837
            return true;
5838
        } else {
5839
            throw new EE_Error(
5840
                sprintf(
5841
                    __('Context "%1$s" passed into model "%2$s" is not a valid context. They are: %3$s',
5842
                        'event_espresso'),
5843
                    $context,
5844
                    'EEM_Base',
5845
                    implode(',', $valid_cap_contexts)
5846
                )
5847
            );
5848
        }
5849
    }
5850