You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.
Every new PR have this error during the Travis build:
1) Faker\Test\Provider\DateTimeTest::testFixedSeedWithMaximumTimestamp
InvalidArgumentException: Start date must be anterior to end date.
/home/travis/build/fzaninotto/Faker/src/Faker/Provider/DateTime.php:134
/home/travis/build/fzaninotto/Faker/src/Faker/Provider/DateTime.php:216
/home/travis/build/fzaninotto/Faker/test/Faker/Provider/DateTimeTest.php:251
I can't detail more as I really don't understand where this error come from...
Here's the class:
publicstaticfunctiondateTimeBetween($startDate = '-30 years', $endDate = 'now', $timezone = null)
{
$startTimestamp = $startDateinstanceof \DateTime ? $startDate->getTimestamp() : strtotime($startDate);
$endTimestamp = static::getMaxTimestamp($endDate);
if ($startTimestamp > $endTimestamp) {
thrownew \InvalidArgumentException('Start date must be anterior to end date.');
}
$timestamp = mt_rand($startTimestamp, $endTimestamp);
returnstatic::setTimezone(
new \DateTime('@' . $timestamp),
$timezone
);
}
The text was updated successfully, but these errors were encountered:
Every new PR have this error during the Travis build:
I can't detail more as I really don't understand where this error come from...
Here's the class:
The text was updated successfully, but these errors were encountered: