Code Duplication    Length = 16-16 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 2345-2360 (lines=16) @@
2342
     * @param array  $arguments_to_provide
2343
     * @return string
2344
     */
2345
    private function _verify_core_db($wpdb_method, $arguments_to_provide)
2346
    {
2347
        /** @type WPDB $wpdb */
2348
        global $wpdb;
2349
        //ok remember that we've already attempted fixing the core db, in case the problem persists
2350
        EEM_Base::$_db_verification_level = EEM_Base::db_verified_core;
2351
        $error_message = sprintf(
2352
            __('WPDB Error "%1$s" while running wpdb method "%2$s" with arguments %3$s. Automatically attempting to fix EE Core DB',
2353
                'event_espresso'),
2354
            $wpdb->last_error,
2355
            $wpdb_method,
2356
            wp_json_encode($arguments_to_provide)
2357
        );
2358
        EE_System::instance()->initialize_db_if_no_migrations_required(false, true);
2359
        return $error_message;
2360
    }
2361
2362
2363
@@ 2372-2387 (lines=16) @@
2369
     * @param $arguments_to_provide
2370
     * @return string
2371
     */
2372
    private function _verify_addons_db($wpdb_method, $arguments_to_provide)
2373
    {
2374
        /** @type WPDB $wpdb */
2375
        global $wpdb;
2376
        //ok remember that we've already attempted fixing the addons dbs, in case the problem persists
2377
        EEM_Base::$_db_verification_level = EEM_Base::db_verified_addons;
2378
        $error_message = sprintf(
2379
            __('WPDB AGAIN: Error "%1$s" while running the same method and arguments as before. Automatically attempting to fix EE Addons DB',
2380
                'event_espresso'),
2381
            $wpdb->last_error,
2382
            $wpdb_method,
2383
            wp_json_encode($arguments_to_provide)
2384
        );
2385
        EE_System::instance()->initialize_addons();
2386
        return $error_message;
2387
    }
2388
2389
2390