Skip to content

Commit f8fb91b

Browse files
committed
minor symfony#20479 [Workflow] Removed private Definition::addPlaces (Nyholm)
This PR was merged into the 3.2-dev branch. Discussion ---------- [Workflow] Removed private Definition::addPlaces | Q | A | ------------- | --- | Branch? | "master" | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a There is no need for this method Commits ------- c546857 Removed private Definition::addPlaces
2 parents d293f60 + c546857 commit f8fb91b

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
@@ -32,11 +32,15 @@ final class Definition
3232
*/
3333
public function __construct(array $places, array $transitions, $initialPlace = null)
3434
{
35-
$this->addPlaces($places);
36-
$this->setInitialPlace($initialPlace);
35+
foreach ($places as $place) {
36+
$this->addPlace($place);
37+
}
38+
3739
foreach ($transitions as $transition) {
3840
$this->addTransition($transition);
3941
}
42+
43+
$this->setInitialPlace($initialPlace);
4044
}
4145

4246
/**
@@ -89,13 +93,6 @@ private function addPlace($place)
8993
$this->places[$place] = $place;
9094
}
9195

92-
private function addPlaces(array $places)
93-
{
94-
foreach ($places as $place) {
95-
$this->addPlace($place);
96-
}
97-
}
98-
9996
private function addTransition(Transition $transition)
10097
{
10198
$name = $transition->getName();

0 commit comments

Comments
 (0)