mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-22 08:42:17 +02:00
🚨 PHP code : remove warnings
This commit is contained in:
@@ -45,6 +45,7 @@ class NotifyOnExpiration implements iScheduledProcess
|
|||||||
* Gives the exact time at which the process must be run next time
|
* Gives the exact time at which the process must be run next time
|
||||||
*
|
*
|
||||||
* @return \DateTime
|
* @return \DateTime
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function GetNextOccurrence()
|
public function GetNextOccurrence()
|
||||||
{
|
{
|
||||||
@@ -109,6 +110,13 @@ class NotifyOnExpiration implements iScheduledProcess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
|
*
|
||||||
|
* @throws \CoreException
|
||||||
|
* @throws \CoreUnexpectedValue
|
||||||
|
* @throws \MissingQueryArgument
|
||||||
|
* @throws \MySQLException
|
||||||
|
* @throws \MySQLHasGoneAwayException
|
||||||
|
* @throws \OQLException
|
||||||
*/
|
*/
|
||||||
public function Process($iTimeLimit)
|
public function Process($iTimeLimit)
|
||||||
{
|
{
|
||||||
@@ -147,7 +155,7 @@ class NotifyOnExpiration implements iScheduledProcess
|
|||||||
|
|
||||||
$oSet = new DBObjectSet($oSearch);
|
$oSet = new DBObjectSet($oSearch);
|
||||||
$this->Trace('|- Objects:');
|
$this->Trace('|- Objects:');
|
||||||
/** @var $oToTrigger DBObject */
|
/** @var DBObject $oToTrigger */
|
||||||
while ((time() < $iTimeLimit) && $oToTrigger = $oSet->Fetch())
|
while ((time() < $iTimeLimit) && $oToTrigger = $oSet->Fetch())
|
||||||
{
|
{
|
||||||
// Catching exceptions so the process don't get stucked on this object
|
// Catching exceptions so the process don't get stucked on this object
|
||||||
@@ -159,6 +167,7 @@ class NotifyOnExpiration implements iScheduledProcess
|
|||||||
// Combine the current object :this and :rule to be available in the notification
|
// Combine the current object :this and :rule to be available in the notification
|
||||||
$aContext = $oToTrigger->ToArgs('this');
|
$aContext = $oToTrigger->ToArgs('this');
|
||||||
$aContext = array_merge($aContext, $aRuleContext);
|
$aContext = array_merge($aContext, $aRuleContext);
|
||||||
|
/** @var TriggerOnExpirationRule $oTrigger */
|
||||||
while ($oTrigger = $oTriggerSet->Fetch())
|
while ($oTrigger = $oTriggerSet->Fetch())
|
||||||
{
|
{
|
||||||
$oTrigger->DoActivate($aContext);
|
$oTrigger->DoActivate($aContext);
|
||||||
@@ -226,6 +235,7 @@ class NotifyOnExpiration implements iScheduledProcess
|
|||||||
* Note: This comes from itop-backup scheduled task.
|
* Note: This comes from itop-backup scheduled task.
|
||||||
*
|
*
|
||||||
* @returns array of int (monday = 1)
|
* @returns array of int (monday = 1)
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function InterpretWeekDays()
|
public function InterpretWeekDays()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user