Code Duplication    Length = 3-12 lines in 3 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 3502-3504 (lines=3) @@
3499
        $where_query_params = array()
3500
    ) {
3501
        $allowed_used_default_where_conditions_values = EEM_Base::valid_default_where_conditions();
3502
        if (! in_array($use_default_where_conditions, $allowed_used_default_where_conditions_values)) {
3503
            throw new EE_Error(sprintf(__("You passed an invalid value to the query parameter 'default_where_conditions' of '%s'. Allowed values are %s",
3504
                "event_espresso"), $use_default_where_conditions,
3505
                implode(", ", $allowed_used_default_where_conditions_values)));
3506
        }
3507
        $universal_query_params = array();
@@ 5855-5866 (lines=12) @@
5852
    static public function verify_is_valid_cap_context($context)
5853
    {
5854
        $valid_cap_contexts = EEM_Base::valid_cap_contexts();
5855
        if (in_array($context, $valid_cap_contexts)) {
5856
            return true;
5857
        } else {
5858
            throw new EE_Error(
5859
                sprintf(
5860
                    __('Context "%1$s" passed into model "%2$s" is not a valid context. They are: %3$s',
5861
                        'event_espresso'),
5862
                    $context,
5863
                    'EEM_Base',
5864
                    implode(',', $valid_cap_contexts)
5865
                )
5866
            );
5867
        }
5868
    }
5869

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