Skip to content

Commit c546857

Browse files
committed
Removed private Definition::addPlaces
There is no need for this method
1 parent e493a1b commit c546857

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/Symfony/Component/Workflow/Definition.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,15 @@ final class Definition
3434
*/
3535
public function __construct(array $places, array $transitions, $initialPlace = null)
3636
{
37-
$this->addPlaces($places);
38-
$this->setInitialPlace($initialPlace);
37+
foreach ($places as $place) {
38+
$this->addPlace($place);
39+
}
40+
3941
foreach ($transitions as $transition) {
4042
$this->addTransition($transition);
4143
}
44+
45+
$this->setInitialPlace($initialPlace);
4246
}
4347

4448
/**
@@ -91,13 +95,6 @@ private function addPlace($place)
9195
$this->places[$place] = $place;
9296
}
9397

94-
private function addPlaces(array $places)
95-
{
96-
foreach ($places as $place) {
97-
$this->addPlace($place);
98-
}
99-
}
100-
10198
private function addTransition(Transition $transition)
10299
{
103100
$name = $transition->getName();

0 commit comments

Comments
 (0)