Code Duplication    Length = 8-10 lines in 2 locations

programs/utilit/agent_right.class.php 1 location

@@ 1183-1190 (lines=8) @@
1180
	 * 
1181
	 * @return bool
1182
	 */
1183
	public function isAccessibleOnMonth()
1184
	{
1185
		require_once $GLOBALS['babInstallPath'].'utilit/dateTime.php';
1186
		$begin = new BAB_DateTime(date('Y'), date('n'), 1);
1187
		$end = new BAB_DateTime(date('Y'), date('n'), date('t'), 23, 59, 59);
1188
		
1189
		return $this->isAccessibleOnPeriod($begin->getTimeStamp(), $end->getTimeStamp());
1190
	}
1191
	
1192
	
1193
	

programs/utilit/right.class.php 1 location

@@ 615-624 (lines=10) @@
612
	 *
613
	 * @return bool
614
	 */
615
	public function isAccessibleOnMonth()
616
	{
617
		require_once $GLOBALS['babInstallPath'].'utilit/dateTime.php';
618
		$begin = new BAB_DateTime(date('Y'), date('n'), 1);
619
		$end = new BAB_DateTime(date('Y'), date('n'), date('t'), 23, 59, 59);
620
		
621
		$rightRule = $this->getRightRule();
622
	
623
		return $rightRule->isAccessibleOnPeriod($begin->getTimeStamp(), $end->getTimeStamp());
624
	}
625
	
626
	
627