diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2015-01-02 10:14:42 +0300 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2015-01-12 04:59:58 +0300 |
commit | abba647fcbad09b06b0b9c53eb2b2565f5952abe (patch) | |
tree | f28e7a3f27d1ef44caf4b2b1f1b15d1dc896f393 /core/Scheduler/Timetable.php | |
parent | b720e02d59d6e9e5f6dcdba9fbd066155678855e (diff) |
Add type-hint to remove warnings
Diffstat (limited to 'core/Scheduler/Timetable.php')
-rw-r--r-- | core/Scheduler/Timetable.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/Scheduler/Timetable.php b/core/Scheduler/Timetable.php index 385540e1d5..7e811c8378 100644 --- a/core/Scheduler/Timetable.php +++ b/core/Scheduler/Timetable.php @@ -10,7 +10,6 @@ namespace Piwik\Scheduler; use Piwik\Option; -use Piwik\ScheduledTask; use Piwik\Date; /** @@ -40,6 +39,9 @@ class Timetable $this->timetable = $timetable; } + /** + * @param Task[] $activeTasks + */ public function removeInactiveTasks($activeTasks) { $activeTaskNames = array(); @@ -97,7 +99,7 @@ class Timetable return !$this->taskHasBeenScheduledOnce($taskName) || $this->shouldExecuteTask($taskName); } - public function rescheduleTask($task) + public function rescheduleTask(Task $task) { // update the scheduled time $this->timetable[$task->getName()] = $task->getRescheduledTime(); @@ -111,7 +113,7 @@ class Timetable public function getScheduledTimeForMethod($className, $methodName, $methodParameter = null) { - $taskName = ScheduledTask::getTaskName($className, $methodName, $methodParameter); + $taskName = Task::getTaskName($className, $methodName, $methodParameter); return $this->taskHasBeenScheduledOnce($taskName) ? $this->timetable[$taskName] : false; } |