Code Duplication    Length = 14-16 lines in 2 locations

programs/utilit/right_rule.class.php 1 location

@@ 131-146 (lines=16) @@
128
	/**
129
	 * @return absences_Type
130
	 */
131
	public function getType()
132
	{
133
		if (!isset($this->type))
134
		{
135
			$row = $this->getRow();
136
			
137
			if (empty($row['trigger_type']))
138
			{
139
				return null;
140
			}
141
			
142
			$this->type = new absences_Type($row['trigger_type']);
143
		}
144
	
145
		return $this->type;
146
	}
147
	
148
	
149
	

programs/utilit/right.class.php 1 location

@@ 332-345 (lines=14) @@
329
	/**
330
	 * @return absences_Rgroup
331
	 */
332
	public function getRgroup()
333
	{
334
		if (!isset($this->rgroup))
335
		{
336
			$row = $this->getRow();
337
			if (empty($row['id_rgroup']))
338
			{
339
				return null;
340
			}
341
			$this->rgroup = new absences_Rgroup($row['id_rgroup']);
342
		}
343
	
344
		return $this->rgroup;
345
	}
346
	
347
	/**
348
	 *