Code Duplication    Length = 3-12 lines in 3 locations

core/EE_Registry.core.php 1 location

@@ 791-801 (lines=11) @@
788
        // don't give up! you gotta...
789
        try {
790
            //does the file exist and can it be read ?
791
            if ( ! $path) {
792
                // so sorry, can't find the file
793
                throw new EE_Error (
794
                    sprintf(
795
                        __('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'),
796
                        trim($type, '.'),
797
                        $class_name,
798
                        '<br />' . implode(',<br />', $file_paths)
799
                    )
800
                );
801
            }
802
            // get the file
803
            require_once($path);
804
            // if the class isn't already declared somewhere

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