Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 89b3a0e

Browse filesBrowse files
committed
[Workflow] Added fluent interface to the DefinitionBuilder
1 parent 323529c commit 89b3a0e
Copy full SHA for 89b3a0e

File tree

1 file changed

+12
-0
lines changed
Filter options

1 file changed

+12
-0
lines changed

‎src/Symfony/Component/Workflow/DefinitionBuilder.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Workflow/DefinitionBuilder.php
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,15 @@ public function reset()
5252
$this->places = array();
5353
$this->transitions = array();
5454
$this->initialPlace = null;
55+
56+
return $this;
5557
}
5658

5759
public function setInitialPlace($place)
5860
{
5961
$this->initialPlace = $place;
62+
63+
return $this;
6064
}
6165

6266
public function addPlace($place)
@@ -70,13 +74,17 @@ public function addPlace($place)
7074
}
7175

7276
$this->places[$place] = $place;
77+
78+
return $this;
7379
}
7480

7581
public function addPlaces(array $places)
7682
{
7783
foreach ($places as $place) {
7884
$this->addPlace($place);
7985
}
86+
87+
return $this;
8088
}
8189

8290
/**
@@ -87,10 +95,14 @@ public function addTransitions(array $transitions)
8795
foreach ($transitions as $transition) {
8896
$this->addTransition($transition);
8997
}
98+
99+
return $this;
90100
}
91101

92102
public function addTransition(Transition $transition)
93103
{
94104
$this->transitions[] = $transition;
105+
106+
return $this;
95107
}
96108
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.