Code Duplication    Length = 14-14 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 2030-2043 (lines=14) @@
2027
	 * @param array $arguments_to_provide
2028
	 * @return string
2029
	 */
2030
	private function _verify_core_db( $wpdb_method, $arguments_to_provide ){
2031
		/** @type WPDB $wpdb */
2032
		global $wpdb;
2033
		//ok remember that we've already attempted fixing the core db, in case the problem persists
2034
		EEM_Base::$_db_verification_level = EEM_Base::db_verified_core;
2035
		$error_message = sprintf(
2036
			__( 'WPDB Error "%1$s" while running wpdb method "%2$s" with arguments %3$s. Automatically attempting to fix EE Core DB', 'event_espresso' ),
2037
			$wpdb->last_error,
2038
			$wpdb_method,
2039
			json_encode( $arguments_to_provide )
2040
		);
2041
		EE_System::instance()->initialize_db_if_no_migrations_required( false, true );
2042
		return $error_message;
2043
	}
2044
2045
2046
@@ 2054-2067 (lines=14) @@
2051
	 * @param $arguments_to_provide
2052
	 * @return string
2053
	 */
2054
	private function _verify_addons_db( $wpdb_method, $arguments_to_provide ) {
2055
		/** @type WPDB $wpdb */
2056
		global $wpdb;
2057
		//ok remember that we've already attempted fixing the addons dbs, in case the problem persists
2058
		EEM_Base::$_db_verification_level = EEM_Base::db_verified_addons;
2059
		$error_message = sprintf(
2060
			__( 'WPDB AGAIN: Error "%1$s" while running the same method and arguments as before. Automatically attempting to fix EE Addons DB', 'event_espresso' ),
2061
			$wpdb->last_error,
2062
			$wpdb_method,
2063
			json_encode( $arguments_to_provide )
2064
		);
2065
		EE_System::instance()->initialize_addons();
2066
		return $error_message;
2067
	}
2068
2069
2070