Code Duplication    Length = 2-2 lines in 2 locations

Sources/Subs-Db-mysql.php 1 location

@@ 780-781 (lines=2) @@
777
	$queryTitle = $method == 'replace' ? 'REPLACE' : ($method == 'ignore' ? 'INSERT IGNORE' : 'INSERT');
778
779
	// Sanity check for replace is key part of the columns array
780
	if ($method == 'replace' && count(array_intersect_key($columns, array_flip($keys))) !== count($keys))
781
		smf_db_error_backtrace('Primary Key field missing in insert call',
782
				'Change the method of db insert to insert or add the pk field to the columns array', E_USER_ERROR, __FILE__, __LINE__);
783
784
	if (!$with_returning || $method != 'ingore')

Sources/Subs-Db-postgresql.php 1 location

@@ 650-651 (lines=2) @@
647
	$table = str_replace('{db_prefix}', $db_prefix, $table);
648
649
	// Sanity check for replace is key part of the columns array
650
	if ($method == 'replace' && count(array_intersect_key($columns, array_flip($keys))) !== count($keys))
651
		smf_db_error_backtrace('Primary Key field missing in insert call',
652
				'Change the method of db insert to insert or add the pk field to the columns array', E_USER_ERROR, __FILE__, __LINE__);
653
654
	// PostgreSQL doesn't support replace: we implement a MySQL-compatible behavior instead