Code Duplication    Length = 9-12 lines in 2 locations

core/services/shortcodes/LegacyShortcodesManager.php 1 location

@@ 144-155 (lines=12) @@
141
        // add class prefix
142
        $shortcode_class = 'EES_' . $shortcode;
143
        // does the shortcode exist ?
144
        if ( ! is_readable($shortcode_path . DS . $shortcode_class . $shortcode_ext)) {
145
            $msg = sprintf(
146
                esc_html__(
147
                    'The requested %s shortcode file could not be found or is not readable due to file permissions. It should be in %s',
148
                    'event_espresso'
149
                ),
150
                $shortcode_class,
151
                $shortcode_path . DS . $shortcode_class . $shortcode_ext
152
            );
153
            EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__);
154
            return false;
155
        }
156
        // load the shortcode class file
157
        require_once($shortcode_path . $shortcode_class . $shortcode_ext);
158
        // verify that class exists

core/EE_Config.core.php 1 location

@@ 1110-1118 (lines=9) @@
1107
        // add class prefix
1108
        $widget_class = 'EEW_' . $widget;
1109
        // does the widget exist ?
1110
        if (! is_readable($widget_path . DS . $widget_class . $widget_ext)) {
1111
            $msg = sprintf(
1112
                __(
1113
                    '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',
1114
                    'event_espresso'
1115
                ),
1116
                $widget_class,
1117
                $widget_path . DS . $widget_class . $widget_ext
1118
            );
1119
            EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__);
1120
            return;
1121
        }