Code Duplication    Length = 16-16 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 2420-2435 (lines=16) @@
2417
     * @param array  $arguments_to_provide
2418
     * @return string
2419
     */
2420
    private function _verify_core_db($wpdb_method, $arguments_to_provide)
2421
    {
2422
        /** @type WPDB $wpdb */
2423
        global $wpdb;
2424
        //ok remember that we've already attempted fixing the core db, in case the problem persists
2425
        EEM_Base::$_db_verification_level = EEM_Base::db_verified_core;
2426
        $error_message = sprintf(
2427
            __('WPDB Error "%1$s" while running wpdb method "%2$s" with arguments %3$s. Automatically attempting to fix EE Core DB',
2428
                'event_espresso'),
2429
            $wpdb->last_error,
2430
            $wpdb_method,
2431
            wp_json_encode($arguments_to_provide)
2432
        );
2433
        EE_System::instance()->initialize_db_if_no_migrations_required(false, true);
2434
        return $error_message;
2435
    }
2436
2437
2438
@@ 2447-2462 (lines=16) @@
2444
     * @param $arguments_to_provide
2445
     * @return string
2446
     */
2447
    private function _verify_addons_db($wpdb_method, $arguments_to_provide)
2448
    {
2449
        /** @type WPDB $wpdb */
2450
        global $wpdb;
2451
        //ok remember that we've already attempted fixing the addons dbs, in case the problem persists
2452
        EEM_Base::$_db_verification_level = EEM_Base::db_verified_addons;
2453
        $error_message = sprintf(
2454
            __('WPDB AGAIN: Error "%1$s" while running the same method and arguments as before. Automatically attempting to fix EE Addons DB',
2455
                'event_espresso'),
2456
            $wpdb->last_error,
2457
            $wpdb_method,
2458
            wp_json_encode($arguments_to_provide)
2459
        );
2460
        EE_System::instance()->initialize_addons();
2461
        return $error_message;
2462
    }
2463
2464
2465