File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
src/Symfony/Component/Workflow Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -34,11 +34,15 @@ final class Definition
34
34
*/
35
35
public function __construct (array $ places , array $ transitions , $ initialPlace = null )
36
36
{
37
- $ this ->addPlaces ($ places );
38
- $ this ->setInitialPlace ($ initialPlace );
37
+ foreach ($ places as $ place ) {
38
+ $ this ->addPlace ($ place );
39
+ }
40
+
39
41
foreach ($ transitions as $ transition ) {
40
42
$ this ->addTransition ($ transition );
41
43
}
44
+
45
+ $ this ->setInitialPlace ($ initialPlace );
42
46
}
43
47
44
48
/**
@@ -91,13 +95,6 @@ private function addPlace($place)
91
95
$ this ->places [$ place ] = $ place ;
92
96
}
93
97
94
- private function addPlaces (array $ places )
95
- {
96
- foreach ($ places as $ place ) {
97
- $ this ->addPlace ($ place );
98
- }
99
- }
100
-
101
98
private function addTransition (Transition $ transition )
102
99
{
103
100
$ name = $ transition ->getName ();
You can’t perform that action at this time.
0 commit comments