Code Duplication    Length = 14-14 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 1909-1922 (lines=14) @@
1906
	 * @param array $arguments_to_provide
1907
	 * @return string
1908
	 */
1909
	private function _verify_core_db( $wpdb_method, $arguments_to_provide ){
1910
		/** @type WPDB $wpdb */
1911
		global $wpdb;
1912
		//ok remember that we've already attempted fixing the core db, in case the problem persists
1913
		EEM_Base::$_db_verification_level = EEM_Base::db_verified_core;
1914
		$error_message = sprintf(
1915
			__( 'WPDB Error "%1$s" while running wpdb method "%2$s" with arguments %3$s. Automatically attempting to fix EE Core DB', 'event_espresso' ),
1916
			$wpdb->last_error,
1917
			$wpdb_method,
1918
			json_encode( $arguments_to_provide )
1919
		);
1920
		EE_System::instance()->initialize_db_if_no_migrations_required( false, true );
1921
		return $error_message;
1922
	}
1923
1924
1925
@@ 1933-1946 (lines=14) @@
1930
	 * @param $arguments_to_provide
1931
	 * @return string
1932
	 */
1933
	private function _verify_addons_db( $wpdb_method, $arguments_to_provide ) {
1934
		/** @type WPDB $wpdb */
1935
		global $wpdb;
1936
		//ok remember that we've already attempted fixing the addons dbs, in case the problem persists
1937
		EEM_Base::$_db_verification_level = EEM_Base::db_verified_addons;
1938
		$error_message = sprintf(
1939
			__( 'WPDB AGAIN: Error "%1$s" while running the same method and arguments as before. Automatically attempting to fix EE Addons DB', 'event_espresso' ),
1940
			$wpdb->last_error,
1941
			$wpdb_method,
1942
			json_encode( $arguments_to_provide )
1943
		);
1944
		EE_System::instance()->initialize_addons();
1945
		return $error_message;
1946
	}
1947
1948
1949