Code Duplication    Length = 16-16 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 2315-2330 (lines=16) @@
2312
     * @param array  $arguments_to_provide
2313
     * @return string
2314
     */
2315
    private function _verify_core_db($wpdb_method, $arguments_to_provide)
2316
    {
2317
        /** @type WPDB $wpdb */
2318
        global $wpdb;
2319
        //ok remember that we've already attempted fixing the core db, in case the problem persists
2320
        EEM_Base::$_db_verification_level = EEM_Base::db_verified_core;
2321
        $error_message = sprintf(
2322
            __('WPDB Error "%1$s" while running wpdb method "%2$s" with arguments %3$s. Automatically attempting to fix EE Core DB',
2323
                'event_espresso'),
2324
            $wpdb->last_error,
2325
            $wpdb_method,
2326
            wp_json_encode($arguments_to_provide)
2327
        );
2328
        EE_System::instance()->initialize_db_if_no_migrations_required(false, true);
2329
        return $error_message;
2330
    }
2331
2332
2333
@@ 2342-2357 (lines=16) @@
2339
     * @param $arguments_to_provide
2340
     * @return string
2341
     */
2342
    private function _verify_addons_db($wpdb_method, $arguments_to_provide)
2343
    {
2344
        /** @type WPDB $wpdb */
2345
        global $wpdb;
2346
        //ok remember that we've already attempted fixing the addons dbs, in case the problem persists
2347
        EEM_Base::$_db_verification_level = EEM_Base::db_verified_addons;
2348
        $error_message = sprintf(
2349
            __('WPDB AGAIN: Error "%1$s" while running the same method and arguments as before. Automatically attempting to fix EE Addons DB',
2350
                'event_espresso'),
2351
            $wpdb->last_error,
2352
            $wpdb_method,
2353
            wp_json_encode($arguments_to_provide)
2354
        );
2355
        EE_System::instance()->initialize_addons();
2356
        return $error_message;
2357
    }
2358
2359
2360