Skip to content

Commit

Permalink
Removed private Definition::addPlaces
Browse files Browse the repository at this point in the history
There is no need for this method
  • Loading branch information
Nyholm committed Nov 10, 2016
1 parent e493a1b commit c546857
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/Symfony/Component/Workflow/Definition.php
Expand Up @@ -34,11 +34,15 @@ final class Definition
*/
public function __construct(array $places, array $transitions, $initialPlace = null)
{
$this->addPlaces($places);
$this->setInitialPlace($initialPlace);
foreach ($places as $place) {
$this->addPlace($place);
}

foreach ($transitions as $transition) {
$this->addTransition($transition);
}

$this->setInitialPlace($initialPlace);
}

/**
Expand Down Expand Up @@ -91,13 +95,6 @@ private function addPlace($place)
$this->places[$place] = $place;
}

private function addPlaces(array $places)
{
foreach ($places as $place) {
$this->addPlace($place);
}
}

private function addTransition(Transition $transition)
{
$name = $transition->getName();
Expand Down

0 comments on commit c546857

Please sign in to comment.