Code Duplication    Length = 14-14 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 1998-2011 (lines=14) @@
1995
	 * @param array $arguments_to_provide
1996
	 * @return string
1997
	 */
1998
	private function _verify_core_db( $wpdb_method, $arguments_to_provide ){
1999
		/** @type WPDB $wpdb */
2000
		global $wpdb;
2001
		//ok remember that we've already attempted fixing the core db, in case the problem persists
2002
		EEM_Base::$_db_verification_level = EEM_Base::db_verified_core;
2003
		$error_message = sprintf(
2004
			__( 'WPDB Error "%1$s" while running wpdb method "%2$s" with arguments %3$s. Automatically attempting to fix EE Core DB', 'event_espresso' ),
2005
			$wpdb->last_error,
2006
			$wpdb_method,
2007
			json_encode( $arguments_to_provide )
2008
		);
2009
		EE_System::instance()->initialize_db_if_no_migrations_required( false, true );
2010
		return $error_message;
2011
	}
2012
2013
2014
@@ 2022-2035 (lines=14) @@
2019
	 * @param $arguments_to_provide
2020
	 * @return string
2021
	 */
2022
	private function _verify_addons_db( $wpdb_method, $arguments_to_provide ) {
2023
		/** @type WPDB $wpdb */
2024
		global $wpdb;
2025
		//ok remember that we've already attempted fixing the addons dbs, in case the problem persists
2026
		EEM_Base::$_db_verification_level = EEM_Base::db_verified_addons;
2027
		$error_message = sprintf(
2028
			__( 'WPDB AGAIN: Error "%1$s" while running the same method and arguments as before. Automatically attempting to fix EE Addons DB', 'event_espresso' ),
2029
			$wpdb->last_error,
2030
			$wpdb_method,
2031
			json_encode( $arguments_to_provide )
2032
		);
2033
		EE_System::instance()->initialize_addons();
2034
		return $error_message;
2035
	}
2036
2037
2038