Code Duplication    Length = 5-5 lines in 3 locations

sources/subs/ScheduledTask/DailyDigest.php 3 locations

@@ 300-304 (lines=5) @@
297
						if (in_array($mid, $topic['members']))
298
						{
299
							// Start of the new topics with a heading bar
300
							if (!$titled)
301
							{
302
								$email['body'] .= "\n" . $langtxt[$lang]['new_topics'] . ':' . "\n" . str_repeat('-', 78);
303
								$titled = true;
304
							}
305
306
							$email['body'] .= "\n" . sprintf($langtxt[$lang]['topic_lines'], $topic['subject'], $board['name']);
307
							if ($maillist)
@@ 331-335 (lines=5) @@
328
						if (in_array($mid, $topic['members']))
329
						{
330
							// First one in the section gets a nice heading
331
							if (!$titled)
332
							{
333
								$email['body'] .= "\n" . $langtxt[$lang]['new_replies'] . ':' . "\n" . str_repeat('-', 78);
334
								$titled = true;
335
							}
336
337
							$email['body'] .= "\n" . ($topic['count'] === 1 ? sprintf($langtxt[$lang]['replies_one'], $topic['subject']) : sprintf($langtxt[$lang]['replies_many'], $topic['count'], $topic['subject']));
338
							if ($maillist)
@@ 361-365 (lines=5) @@
358
					{
359
						if (in_array($mid, $topic['members']))
360
						{
361
							if (!$titled)
362
							{
363
								$email['body'] .= "\n" . $langtxt[$lang]['mod_actions'] . ':' . "\n" . str_repeat('-', 47);
364
								$titled = true;
365
							}
366
367
							$email['body'] .= "\n" . sprintf($langtxt[$lang][$note_type], $topic['subject']);
368
						}