@@ -87,20 +87,20 @@ discard block |
||
87 | 87 | $globalPassedVertexesMap = $startContext->getGlobalPassedVertexesMap(); |
88 | 88 | $contexts = $this->createContextCollection($traverseMode, $startContext); |
89 | 89 | |
90 | - while(count($contexts)) { |
|
90 | + while (count($contexts)) { |
|
91 | 91 | /** @var TraverseContextInterface $currentContext */ |
92 | 92 | $currentContext = $contexts->pop(); |
93 | 93 | $currentVertex = $currentContext->getVertex(); |
94 | 94 | |
95 | 95 | $customPassCondition = null; |
96 | - if($filter->matchesHandleCondition($currentContext)) { |
|
96 | + if ($filter->matchesHandleCondition($currentContext)) { |
|
97 | 97 | $cmd = (yield $currentContext); |
98 | 98 | |
99 | - if($cmd instanceof FilterConditionInterface) { |
|
99 | + if ($cmd instanceof FilterConditionInterface) { |
|
100 | 100 | $customPassCondition = $cmd; |
101 | 101 | yield $currentContext; |
102 | 102 | } else { |
103 | - switch($cmd) { |
|
103 | + switch ($cmd) { |
|
104 | 104 | case static::STOP_BRANCH: |
105 | 105 | yield $currentContext; |
106 | 106 | continue 2; |
@@ -118,9 +118,9 @@ discard block |
||
118 | 118 | $nextVertexes = $this->getNextVertexes($currentVertex, $customPassCondition); |
119 | 119 | |
120 | 120 | $i = 0; |
121 | - foreach($nextVertexes as $edge => $vertex) { |
|
121 | + foreach ($nextVertexes as $edge => $vertex) { |
|
122 | 122 | $currentBranchContext = $currentContext->getBranchContext(); |
123 | - if(count($nextVertexes) > 1 && $i > 0) { |
|
123 | + if (count($nextVertexes) > 1 && $i > 0) { |
|
124 | 124 | $nextBranchContext = $this->createBranchContext( |
125 | 125 | ++$lastBranchIndex, |
126 | 126 | $currentBranchContext->getIndex(), |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | int $traverseMode, |
170 | 170 | TraverseContextInterface $startContext |
171 | 171 | ): Collection { |
172 | - if($traverseMode === self::MODE_WIDE) { |
|
172 | + if ($traverseMode === self::MODE_WIDE) { |
|
173 | 173 | $contexts = new Queue([$startContext]); |
174 | 174 | } else { |
175 | 175 | $contexts = new Stack([$startContext]); |