Code Duplication    Length = 16-16 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 2437-2452 (lines=16) @@
2434
     * @param array  $arguments_to_provide
2435
     * @return string
2436
     */
2437
    private function _verify_core_db($wpdb_method, $arguments_to_provide)
2438
    {
2439
        /** @type WPDB $wpdb */
2440
        global $wpdb;
2441
        //ok remember that we've already attempted fixing the core db, in case the problem persists
2442
        EEM_Base::$_db_verification_level = EEM_Base::db_verified_core;
2443
        $error_message = sprintf(
2444
            __('WPDB Error "%1$s" while running wpdb method "%2$s" with arguments %3$s. Automatically attempting to fix EE Core DB',
2445
                'event_espresso'),
2446
            $wpdb->last_error,
2447
            $wpdb_method,
2448
            wp_json_encode($arguments_to_provide)
2449
        );
2450
        EE_System::instance()->initialize_db_if_no_migrations_required(false, true);
2451
        return $error_message;
2452
    }
2453
2454
2455
@@ 2464-2479 (lines=16) @@
2461
     * @param $arguments_to_provide
2462
     * @return string
2463
     */
2464
    private function _verify_addons_db($wpdb_method, $arguments_to_provide)
2465
    {
2466
        /** @type WPDB $wpdb */
2467
        global $wpdb;
2468
        //ok remember that we've already attempted fixing the addons dbs, in case the problem persists
2469
        EEM_Base::$_db_verification_level = EEM_Base::db_verified_addons;
2470
        $error_message = sprintf(
2471
            __('WPDB AGAIN: Error "%1$s" while running the same method and arguments as before. Automatically attempting to fix EE Addons DB',
2472
                'event_espresso'),
2473
            $wpdb->last_error,
2474
            $wpdb_method,
2475
            wp_json_encode($arguments_to_provide)
2476
        );
2477
        EE_System::instance()->initialize_addons();
2478
        return $error_message;
2479
    }
2480
2481
2482