Code Duplication    Length = 5-9 lines in 3 locations

core/EE_Module_Request_Router.core.php 1 location

@@ 204-210 (lines=7) @@
201
        // instantiate module class
202
        $module = new $module_name();
203
        // ensure that class is actually a module
204
        if (! $module instanceof EED_Module) {
205
            EE_Error::add_error(
206
                sprintf(__('The requested %s module is not of the class EED_Module.', 'event_espresso'), $module_name),
207
                __FILE__, __FUNCTION__, __LINE__
208
            );
209
            return null;
210
        }
211
        return $module;
212
    }
213

core/admin/EE_Admin_Page.core.php 1 location

@@ 1314-1318 (lines=5) @@
1311
                                                             . $tour
1312
                                                             . '.class.php' : $file_path;
1313
                    //if file is STILL not readable then let's do a EE_Error so its more graceful than a fatal error.
1314
                    if (! is_readable($file_path)) {
1315
                        EE_Error::add_error(
1316
                            sprintf(
1317
                                __(
1318
                                    'The file path given for the help tour (%s) is not a valid path.  Please check that the string you set for the help tour on this route (%s) is the correct spelling',
1319
                                    'event_espresso'
1320
                                ),
1321
                                $file_path,

core/EE_Session.core.php 1 location

@@ 598-606 (lines=9) @@
595
                    EE_Session::hash_check_prefix . $this->_sid,
596
                    false
597
                );
598
                if ($hash_check && $hash_check !== md5($session_data)) {
599
                    EE_Error::add_error(
600
                        sprintf(
601
                            __(
602
                                'The stored data for session %1$s failed to pass a hash check and therefore appears to be invalid.',
603
                                'event_espresso'
604
                            ),
605
                            EE_Session::session_id_prefix . $this->_sid
606
                        ),
607
                        __FILE__, __FUNCTION__, __LINE__
608
                    );
609
                }