Code Duplication    Length = 9-12 lines in 2 locations

core/services/shortcodes/LegacyShortcodesManager.php 1 location

@@ 132-143 (lines=12) @@
129
        // add class prefix
130
        $shortcode_class = 'EES_' . $shortcode;
131
        // does the shortcode exist ?
132
        if ( ! is_readable($shortcode_path . DS . $shortcode_class . $shortcode_ext)) {
133
            $msg = sprintf(
134
                esc_html__(
135
                    'The requested %s shortcode file could not be found or is not readable due to file permissions. It should be in %s',
136
                    'event_espresso'
137
                ),
138
                $shortcode_class,
139
                $shortcode_path . DS . $shortcode_class . $shortcode_ext
140
            );
141
            EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__);
142
            return false;
143
        }
144
        // load the shortcode class file
145
        require_once($shortcode_path . $shortcode_class . $shortcode_ext);
146
        // verify that class exists

core/EE_Config.core.php 1 location

@@ 1099-1107 (lines=9) @@
1096
        // add class prefix
1097
        $widget_class = 'EEW_' . $widget;
1098
        // does the widget exist ?
1099
        if (! is_readable($widget_path . DS . $widget_class . $widget_ext)) {
1100
            $msg = sprintf(
1101
                __(
1102
                    'The requested %s widget file could not be found or is not readable due to file permissions. Please ensure the following path is correct: %s',
1103
                    'event_espresso'
1104
                ),
1105
                $widget_class,
1106
                $widget_path . DS . $widget_class . $widget_ext
1107
            );
1108
            EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__);
1109
            return;
1110
        }