Code Duplication    Length = 15-15 lines in 2 locations

factory/idea.php 2 locations

@@ 95-109 (lines=15) @@
92
	 *
93
	 * @return bool True if set, false if invalid.
94
	 */
95
	public function set_duplicate($idea_id, $duplicate)
96
	{
97
		if ($duplicate && !is_numeric($duplicate))
98
		{
99
			return false;
100
		}
101
102
		$sql_ary = array(
103
			'duplicate_id'	=> (int) $duplicate,
104
		);
105
106
		$this->update_idea_data($sql_ary, $idea_id, $this->table_ideas);
107
108
		return true;
109
	}
110
111
	/**
112
	 * Sets the RFC link of an idea.
@@ 144-158 (lines=15) @@
141
	 *
142
	 * @return bool True if set, false if invalid.
143
	 */
144
	public function set_ticket($idea_id, $ticket)
145
	{
146
		if ($ticket && !is_numeric($ticket))
147
		{
148
			return false;
149
		}
150
151
		$sql_ary = array(
152
			'ticket_id'	=> (int) $ticket,
153
		);
154
155
		$this->update_idea_data($sql_ary, $idea_id, $this->table_ideas);
156
157
		return true;
158
	}
159
160
	/**
161
	 * Sets the implemented version of an idea.