@@ -179,16 +179,17 @@ public function setMaxIterationCount($maxIterationCount)
179
179
/**
180
180
* Get a next run date relative to the current date or a specific date
181
181
*
182
- * @param string|\DateTime $currentTime Relative calculation date
183
- * @param int $nth Number of matches to skip before returning a
184
- * matching next run date. 0, the default, will return the current
185
- * date and time if the next run date falls on the current date and
186
- * time. Setting this value to 1 will skip the first match and go to
187
- * the second match. Setting this value to 2 will skip the first 2
188
- * matches and so on.
189
- * @param bool $allowCurrentDate Set to TRUE to return the current date if
190
- * it matches the cron expression.
191
- * @param null|string $timeZone TimeZone to use instead of the system default
182
+ * @param string|\DateTimeInterface $currentTime Relative calculation date
183
+ * @param int $nth Number of matches to skip before returning a
184
+ * matching next run date. 0, the default, will return the
185
+ * current date and time if the next run date falls on the
186
+ * current date and time. Setting this value to 1 will
187
+ * skip the first match and go to the second match.
188
+ * Setting this value to 2 will skip the first 2
189
+ * matches and so on.
190
+ * @param bool $allowCurrentDate Set to TRUE to return the current date if
191
+ * it matches the cron expression.
192
+ * @param null|string $timeZone TimeZone to use instead of the system default
192
193
*
193
194
* @return \DateTime
194
195
* @throws \RuntimeException on too many iterations
@@ -201,11 +202,11 @@ public function getNextRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate
201
202
/**
202
203
* Get a previous run date relative to the current date or a specific date
203
204
*
204
- * @param string|\DateTime $currentTime Relative calculation date
205
- * @param int $nth Number of matches to skip before returning
206
- * @param bool $allowCurrentDate Set to TRUE to return the
207
- * current date if it matches the cron expression
208
- * @param null|string $timeZone TimeZone to use instead of the system default
205
+ * @param string|\DateTimeInterface $currentTime Relative calculation date
206
+ * @param int $nth Number of matches to skip before returning
207
+ * @param bool $allowCurrentDate Set to TRUE to return the
208
+ * current date if it matches the cron expression
209
+ * @param null|string $timeZone TimeZone to use instead of the system default
209
210
*
210
211
* @return \DateTime
211
212
* @throws \RuntimeException on too many iterations
@@ -219,14 +220,14 @@ public function getPreviousRunDate($currentTime = 'now', $nth = 0, $allowCurrent
219
220
/**
220
221
* Get multiple run dates starting at the current date or a specific date
221
222
*
222
- * @param int $total Set the total number of dates to calculate
223
- * @param string|\DateTime $currentTime Relative calculation date
224
- * @param bool $invert Set to TRUE to retrieve previous dates
225
- * @param bool $allowCurrentDate Set to TRUE to return the
226
- * current date if it matches the cron expression
227
- * @param null|string $timeZone TimeZone to use instead of the system default
223
+ * @param int $total Set the total number of dates to calculate
224
+ * @param string|\DateTimeInterface $currentTime Relative calculation date
225
+ * @param bool $invert Set to TRUE to retrieve previous dates
226
+ * @param bool $allowCurrentDate Set to TRUE to return the
227
+ * current date if it matches the cron expression
228
+ * @param null|string $timeZone TimeZone to use instead of the system default
228
229
*
229
- * @return array Returns an array of run dates
230
+ * @return \DateTime[] Returns an array of run dates
230
231
*/
231
232
public function getMultipleRunDates ($ total , $ currentTime = 'now ' , $ invert = false , $ allowCurrentDate = false , $ timeZone = null )
232
233
{
@@ -277,8 +278,8 @@ public function __toString()
277
278
* specific date. This method assumes that the current number of
278
279
* seconds are irrelevant, and should be called once per minute.
279
280
*
280
- * @param string|\DateTime $currentTime Relative calculation date
281
- * @param null|string $timeZone TimeZone to use instead of the system default
281
+ * @param string|\DateTimeInterface $currentTime Relative calculation date
282
+ * @param null|string $timeZone TimeZone to use instead of the system default
282
283
*
283
284
* @return bool Returns TRUE if the cron is due to run or FALSE if not
284
285
*/
@@ -310,12 +311,12 @@ public function isDue($currentTime = 'now', $timeZone = null)
310
311
/**
311
312
* Get the next or previous run date of the expression relative to a date
312
313
*
313
- * @param string|\DateTime $currentTime Relative calculation date
314
- * @param int $nth Number of matches to skip before returning
315
- * @param bool $invert Set to TRUE to go backwards in time
316
- * @param bool $allowCurrentDate Set to TRUE to return the
317
- * current date if it matches the cron expression
318
- * @param string|null $timeZone TimeZone to use instead of the system default
314
+ * @param string|\DateTimeInterface $currentTime Relative calculation date
315
+ * @param int $nth Number of matches to skip before returning
316
+ * @param bool $invert Set to TRUE to go backwards in time
317
+ * @param bool $allowCurrentDate Set to TRUE to return the
318
+ * current date if it matches the cron expression
319
+ * @param string|null $timeZone TimeZone to use instead of the system default
319
320
*
320
321
* @return \DateTime
321
322
* @throws \RuntimeException on too many iterations
0 commit comments