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

Commit 0bf748a

Browse files
committed
HHVM compatibility
1 parent b6bf9c4 commit 0bf748a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Faker/Provider/DateTime.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now
126126
* @example dateTimeInInterval('1999-02-02 11:42:52', '+ 5 days')
127127
* @return \DateTime
128128
*/
129-
public static function dateTimeInInterval($date = '-30 years', $interval = '+ 5 days')
129+
public static function dateTimeInInterval($date = '-30 years', $interval = '+5 days')
130130
{
131131
$intervalObject = \DateInterval::createFromDateString($interval);
132132
$datetime = $date instanceof \DateTime ? $date : new \DateTime($date);

test/Faker/Provider/DateTimeTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function providerDateTimeBetween()
7878
*
7979
* @dataProvider providerDateTimeInInterval
8080
*/
81-
public function testDateTimeInInterval($start, $interval = "+ 5 days", $isInFutur)
81+
public function testDateTimeInInterval($start, $interval = "+5 days", $isInFutur)
8282
{
8383
$date = DateTimeProvider::dateTimeInInterval($start, $interval);
8484
$this->assertInstanceOf('\DateTime', $date);
@@ -97,9 +97,9 @@ public function testDateTimeInInterval($start, $interval = "+ 5 days", $isInFutu
9797
public function providerDateTimeInInterval()
9898
{
9999
return array(
100-
array('-1 year', '+5 minute', false),
100+
array('-1 year', null, true),
101101
array('-1 day', '-1 hour', false),
102-
array('-1 day', '+ 1 hour', true),
102+
array('-1 day', '+1 hour', true),
103103
);
104104
}
105105

0 commit comments

Comments
 (0)