Code Duplication    Length = 14-16 lines in 2 locations

programs/utilit/right.class.php 1 location

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

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