Code Duplication    Length = 5-5 lines in 2 locations

Sources/Subs-Db-mysql.php 1 location

@@ 272-276 (lines=5) @@
269
				smf_db_error_backtrace('Wrong value type sent to the database. Datetime expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__);
270
		break;
271
272
		case 'float':
273
			if (!is_numeric($replacement))
274
				smf_db_error_backtrace('Wrong value type sent to the database. Floating point number expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__);
275
			return (string) (float) $replacement;
276
		break;
277
278
		case 'identifier':
279
			// Backticks inside identifiers are supported as of MySQL 4.1. We don't need them for SMF.

Sources/Subs-Db-postgresql.php 1 location

@@ 232-236 (lines=5) @@
229
				smf_db_error_backtrace('Wrong value type sent to the database. Datetime expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__);
230
		break;
231
232
		case 'float':
233
			if (!is_numeric($replacement))
234
				smf_db_error_backtrace('Wrong value type sent to the database. Floating point number expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__);
235
			return (string) (float) $replacement;
236
		break;
237
238
		case 'identifier':
239
			return '"' . strtr($replacement, array('`' => '', '.' => '"."')) . '"';