Skip to content

Commit

Permalink
Merge 4e47611 into 0bd9655
Browse files Browse the repository at this point in the history
  • Loading branch information
florianv committed Jan 12, 2014
2 parents 0bd9655 + 4e47611 commit ac53433
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Petrinet/Place/Place.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function removeOneToken()
}

/**
* Removes all tokens.
* {@inheritdoc}
*/
public function clearTokens()
{
Expand Down
5 changes: 5 additions & 0 deletions src/Petrinet/Place/PlaceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,9 @@ public function removeOneToken();
* @return boolean True if empty, false otherwise
*/
public function isEmpty();

/**
* Removes all tokens from the place.
*/
public function clearTokens();
}
1 change: 0 additions & 1 deletion src/Petrinet/Tests/PetrinetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public function testClearTokens()
$petrinet = new Petrinet('net');
$petrinet->addPlaces(array($place1, $place2, $place3));

$places = $petrinet->clearTokens();
$this->assertCount(0, $petrinet->getPlace('p1'));
$this->assertCount(0, $petrinet->getPlace('p2'));
$this->assertCount(0, $petrinet->getPlace('p3'));
Expand Down

0 comments on commit ac53433

Please sign in to comment.