Code Duplication    Length = 16-16 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

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