Code Duplication    Length = 16-16 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 2390-2405 (lines=16) @@
2387
     * @param array  $arguments_to_provide
2388
     * @return string
2389
     */
2390
    private function _verify_core_db($wpdb_method, $arguments_to_provide)
2391
    {
2392
        /** @type WPDB $wpdb */
2393
        global $wpdb;
2394
        //ok remember that we've already attempted fixing the core db, in case the problem persists
2395
        EEM_Base::$_db_verification_level = EEM_Base::db_verified_core;
2396
        $error_message = sprintf(
2397
            __('WPDB Error "%1$s" while running wpdb method "%2$s" with arguments %3$s. Automatically attempting to fix EE Core DB',
2398
                'event_espresso'),
2399
            $wpdb->last_error,
2400
            $wpdb_method,
2401
            wp_json_encode($arguments_to_provide)
2402
        );
2403
        EE_System::instance()->initialize_db_if_no_migrations_required(false, true);
2404
        return $error_message;
2405
    }
2406
2407
2408
@@ 2417-2432 (lines=16) @@
2414
     * @param $arguments_to_provide
2415
     * @return string
2416
     */
2417
    private function _verify_addons_db($wpdb_method, $arguments_to_provide)
2418
    {
2419
        /** @type WPDB $wpdb */
2420
        global $wpdb;
2421
        //ok remember that we've already attempted fixing the addons dbs, in case the problem persists
2422
        EEM_Base::$_db_verification_level = EEM_Base::db_verified_addons;
2423
        $error_message = sprintf(
2424
            __('WPDB AGAIN: Error "%1$s" while running the same method and arguments as before. Automatically attempting to fix EE Addons DB',
2425
                'event_espresso'),
2426
            $wpdb->last_error,
2427
            $wpdb_method,
2428
            wp_json_encode($arguments_to_provide)
2429
        );
2430
        EE_System::instance()->initialize_addons();
2431
        return $error_message;
2432
    }
2433
2434
2435