Code Duplication    Length = 14-14 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 1817-1830 (lines=14) @@
1814
	 * @param array $arguments_to_provide
1815
	 * @return string
1816
	 */
1817
	private function _verify_core_db( $wpdb_method, $arguments_to_provide ){
1818
		/** @type WPDB $wpdb */
1819
		global $wpdb;
1820
		//ok remember that we've already attempted fixing the core db, in case the problem persists
1821
		EEM_Base::$_db_verification_level = EEM_Base::db_verified_core;
1822
		$error_message = sprintf(
1823
			__( 'WPDB Error "%1$s" while running wpdb method "%2$s" with arguments %3$s. Automatically attempting to fix EE Core DB', 'event_espresso' ),
1824
			$wpdb->last_error,
1825
			$wpdb_method,
1826
			json_encode( $arguments_to_provide )
1827
		);
1828
		EE_System::instance()->initialize_db_if_no_migrations_required( false, true );
1829
		return $error_message;
1830
	}
1831
1832
1833
@@ 1841-1854 (lines=14) @@
1838
	 * @param $arguments_to_provide
1839
	 * @return string
1840
	 */
1841
	private function _verify_addons_db( $wpdb_method, $arguments_to_provide ) {
1842
		/** @type WPDB $wpdb */
1843
		global $wpdb;
1844
		//ok remember that we've already attempted fixing the addons dbs, in case the problem persists
1845
		EEM_Base::$_db_verification_level = EEM_Base::db_verified_addons;
1846
		$error_message = sprintf(
1847
			__( 'WPDB AGAIN: Error "%1$s" while running the same method and arguments as before. Automatically attempting to fix EE Addons DB', 'event_espresso' ),
1848
			$wpdb->last_error,
1849
			$wpdb_method,
1850
			json_encode( $arguments_to_provide )
1851
		);
1852
		EE_System::instance()->initialize_addons();
1853
		return $error_message;
1854
	}
1855
1856
1857