🚨 PHP code : remove warnings

This commit is contained in:
Pierre Goiffon
2019-01-16 17:26:41 +01:00
parent 885f4a64a4
commit f9cff178a8

View File

@@ -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()
{ {