Code Duplication    Length = 16-16 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 2406-2421 (lines=16) @@
2403
     * @param array  $arguments_to_provide
2404
     * @return string
2405
     */
2406
    private function _verify_core_db($wpdb_method, $arguments_to_provide)
2407
    {
2408
        /** @type WPDB $wpdb */
2409
        global $wpdb;
2410
        //ok remember that we've already attempted fixing the core db, in case the problem persists
2411
        EEM_Base::$_db_verification_level = EEM_Base::db_verified_core;
2412
        $error_message = sprintf(
2413
            __('WPDB Error "%1$s" while running wpdb method "%2$s" with arguments %3$s. Automatically attempting to fix EE Core DB',
2414
                'event_espresso'),
2415
            $wpdb->last_error,
2416
            $wpdb_method,
2417
            wp_json_encode($arguments_to_provide)
2418
        );
2419
        EE_System::instance()->initialize_db_if_no_migrations_required(false, true);
2420
        return $error_message;
2421
    }
2422
2423
2424
@@ 2433-2448 (lines=16) @@
2430
     * @param $arguments_to_provide
2431
     * @return string
2432
     */
2433
    private function _verify_addons_db($wpdb_method, $arguments_to_provide)
2434
    {
2435
        /** @type WPDB $wpdb */
2436
        global $wpdb;
2437
        //ok remember that we've already attempted fixing the addons dbs, in case the problem persists
2438
        EEM_Base::$_db_verification_level = EEM_Base::db_verified_addons;
2439
        $error_message = sprintf(
2440
            __('WPDB AGAIN: Error "%1$s" while running the same method and arguments as before. Automatically attempting to fix EE Addons DB',
2441
                'event_espresso'),
2442
            $wpdb->last_error,
2443
            $wpdb_method,
2444
            wp_json_encode($arguments_to_provide)
2445
        );
2446
        EE_System::instance()->initialize_addons();
2447
        return $error_message;
2448
    }
2449
2450
2451