Code Duplication    Length = 8-8 lines in 4 locations

Sources/tasks/ApprovePost-Notify.php 1 location

@@ 106-113 (lines=8) @@
103
		}
104
105
		// Insert the alerts if any
106
		if (!empty($alert_rows))
107
			$smcFunc['db_insert']('',
108
				'{db_prefix}user_alerts',
109
				array('alert_time' => 'int', 'id_member' => 'int', 'id_member_started' => 'int', 'member_name' => 'string',
110
					'content_type' => 'string', 'content_id' => 'int', 'content_action' => 'string', 'is_read' => 'int', 'extra' => 'string'),
111
				$alert_rows,
112
				array()
113
			);
114
115
		return true;
116
	}

Sources/tasks/ApproveReply-Notify.php 1 location

@@ 99-106 (lines=8) @@
96
		}
97
98
		// Insert the alerts if any
99
		if (!empty($alert_rows))
100
			$smcFunc['db_insert']('',
101
				'{db_prefix}user_alerts',
102
				array('alert_time' => 'int', 'id_member' => 'int', 'id_member_started' => 'int', 'member_name' => 'string',
103
					'content_type' => 'string', 'content_id' => 'int', 'content_action' => 'string', 'is_read' => 'int', 'extra' => 'string'),
104
				$alert_rows,
105
				array()
106
			);
107
108
		return true;
109
	}

Sources/tasks/CreatePost-Notify.php 1 location

@@ 215-222 (lines=8) @@
212
		);
213
214
		// Insert the alerts if any
215
		if (!empty($alert_rows))
216
			$smcFunc['db_insert']('',
217
				'{db_prefix}user_alerts',
218
				array('alert_time' => 'int', 'id_member' => 'int', 'id_member_started' => 'int', 'member_name' => 'string',
219
					'content_type' => 'string', 'content_id' => 'int', 'content_action' => 'string', 'is_read' => 'int', 'extra' => 'string'),
220
				$alert_rows,
221
				array()
222
			);
223
224
		return true;
225
	}

Sources/ScheduledTasks.php 1 location

@@ 1575-1582 (lines=8) @@
1572
	}
1573
1574
	// Insert the alerts if any
1575
	if (!empty($alert_rows))
1576
		$smcFunc['db_insert']('',
1577
			'{db_prefix}user_alerts',
1578
			array('alert_time' => 'int', 'id_member' => 'int', 'id_member_started' => 'int', 'member_name' => 'string',
1579
				'content_type' => 'string', 'content_id' => 'int', 'content_action' => 'string', 'is_read' => 'int', 'extra' => 'string'),
1580
			$alert_rows,
1581
			array()
1582
		);
1583
1584
	// Mark the reminder as sent.
1585
	if (!empty($subs_reminded))