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

Commit

Permalink
HHVM compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
nicodmf committed Jun 25, 2015
1 parent b6bf9c4 commit 0bf748a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Faker/Provider/DateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now
* @example dateTimeInInterval('1999-02-02 11:42:52', '+ 5 days')
* @return \DateTime
*/
public static function dateTimeInInterval($date = '-30 years', $interval = '+ 5 days')
public static function dateTimeInInterval($date = '-30 years', $interval = '+5 days')
{
$intervalObject = \DateInterval::createFromDateString($interval);
$datetime = $date instanceof \DateTime ? $date : new \DateTime($date);
Expand Down
6 changes: 3 additions & 3 deletions test/Faker/Provider/DateTimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function providerDateTimeBetween()
*
* @dataProvider providerDateTimeInInterval
*/
public function testDateTimeInInterval($start, $interval = "+ 5 days", $isInFutur)
public function testDateTimeInInterval($start, $interval = "+5 days", $isInFutur)
{
$date = DateTimeProvider::dateTimeInInterval($start, $interval);
$this->assertInstanceOf('\DateTime', $date);
Expand All @@ -97,9 +97,9 @@ public function testDateTimeInInterval($start, $interval = "+ 5 days", $isInFutu
public function providerDateTimeInInterval()
{
return array(
array('-1 year', '+5 minute', false),
array('-1 year', null, true),
array('-1 day', '-1 hour', false),
array('-1 day', '+ 1 hour', true),
array('-1 day', '+1 hour', true),
);
}

Expand Down

0 comments on commit 0bf748a

Please sign in to comment.