Code Duplication    Length = 9-12 lines in 2 locations

core/services/shortcodes/LegacyShortcodesManager.php 1 location

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

core/EE_Config.core.php 1 location

@@ 1080-1088 (lines=9) @@
1077
        // add class prefix
1078
        $widget_class = 'EEW_' . $widget;
1079
        // does the widget exist ?
1080
        if (! is_readable($widget_path . DS . $widget_class . $widget_ext)) {
1081
            $msg = sprintf(
1082
                __(
1083
                    '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',
1084
                    'event_espresso'
1085
                ),
1086
                $widget_class,
1087
                $widget_path . DS . $widget_class . $widget_ext
1088
            );
1089
            EE_Error::add_error($msg . '||' . $msg, __FILE__, __FUNCTION__, __LINE__);
1090
            return;
1091
        }