Code Duplication    Length = 16-16 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

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