Code Duplication    Length = 15-15 lines in 2 locations

factory/ideas.php 2 locations

@@ 396-410 (lines=15) @@
393
	 *
394
	 * @return bool True if set, false if invalid.
395
	 */
396
	public function set_duplicate($idea_id, $duplicate)
397
	{
398
		if ($duplicate && !is_numeric($duplicate))
399
		{
400
			return false;
401
		}
402
403
		$sql_ary = array(
404
			'duplicate_id'	=> (int) $duplicate,
405
		);
406
407
		$this->update_idea_data($sql_ary, $idea_id, $this->table_ideas);
408
409
		return true;
410
	}
411
412
	/**
413
	 * Sets the RFC link of an idea.
@@ 445-459 (lines=15) @@
442
	 *
443
	 * @return bool True if set, false if invalid.
444
	 */
445
	public function set_ticket($idea_id, $ticket)
446
	{
447
		if ($ticket && !is_numeric($ticket))
448
		{
449
			return false;
450
		}
451
452
		$sql_ary = array(
453
			'ticket_id'	=> (int) $ticket,
454
		);
455
456
		$this->update_idea_data($sql_ary, $idea_id, $this->table_ideas);
457
458
		return true;
459
	}
460
461
	/**
462
	 * Sets the implemented version of an idea.