Skip to content

Commit

Permalink
Fixed type hint for setMaxDistance. Closes #46.
Browse files Browse the repository at this point in the history
  • Loading branch information
g- committed Jan 27, 2016
1 parent 784809f commit 7df1e8f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Passbook/Pass.php
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ public function getRelevantDate()
/**
* {@inheritdoc}
*/
public function setMaxDistance(\DateTime $maxDistance)
public function setMaxDistance($maxDistance)
{
$this->maxDistance = $maxDistance;

Expand Down
2 changes: 1 addition & 1 deletion src/Passbook/PassInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function getRelevantDate();
/**
* {@inheritdoc}
*/
public function setMaxDistance(\DateTime $maxDistance);
public function setMaxDistance($maxDistance);

/**
* {@inheritdoc}
Expand Down
6 changes: 6 additions & 0 deletions tests/Passbook/Tests/PassTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ public function testAddingBarcode()
self::assertEquals($barcode2, $barcodes[2]);
}

public function testMaxDistance()
{
$this->storeCard->setMaxDistance(100);
self::assertEquals(100, $this->storeCard->getMaxDistance());
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit 7df1e8f

Please sign in to comment.