Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Fix: Add allowed type DateTime to param annotation #1697

Merged
merged 1 commit into from
Sep 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Faker/Provider/DateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class DateTime extends Base
protected static $defaultTimezone = null;

/**
* @param string|float|int $max
* @param \DateTime|string|float|int $max
* @return int|false
*/
protected static function getMaxTimestamp($max = 'now')
Expand Down Expand Up @@ -147,7 +147,7 @@ public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now
* an interval
* Accepts date string that can be recognized by strtotime().
*
* @param string $date Defaults to 30 years ago
* @param \DateTime|string $date Defaults to 30 years ago
* @param string $interval Defaults to 5 days after
* @param string|null $timezone time zone in which the date time should be set, default to DateTime::$defaultTimezone, if set, otherwise the result of `date_default_timezone_get`
* @example dateTimeInInterval('1999-02-02 11:42:52', '+ 5 days')
Expand Down