@@ -85,20 +85,20 @@ discard block |
||
85 | 85 | $lastBranchIndex = $startContext->getBranchContext()->getIndex(); |
86 | 86 | $globalPassedVertexesMap = $startContext->getGlobalPassedVertexesMap(); |
87 | 87 | |
88 | - if($traverseMode === self::MODE_WIDE) { |
|
88 | + if ($traverseMode === self::MODE_WIDE) { |
|
89 | 89 | $contexts = new Queue([$startContext]); |
90 | 90 | } else { |
91 | 91 | $contexts = new Stack([$startContext]); |
92 | 92 | } |
93 | - while(count($contexts)) { |
|
93 | + while (count($contexts)) { |
|
94 | 94 | /** @var TraverseContextInterface $currentContext */ |
95 | 95 | $currentContext = $contexts->pop(); |
96 | 96 | $currentVertex = $currentContext->getVertex(); |
97 | 97 | $currentEdge = $currentContext->getEdge(); |
98 | 98 | |
99 | - if($filter->getHandleCondition($currentContext)->isSuitableVertex($currentContext->getVertex())) { |
|
99 | + if ($filter->getHandleCondition($currentContext)->isSuitableVertex($currentContext->getVertex())) { |
|
100 | 100 | $cmd = (yield $currentEdge => $currentContext); |
101 | - switch($cmd) { |
|
101 | + switch ($cmd) { |
|
102 | 102 | case static::STOP_BRANCH: |
103 | 103 | yield $currentEdge => $currentContext; |
104 | 104 | continue 2; |
@@ -113,9 +113,9 @@ discard block |
||
113 | 113 | |
114 | 114 | $nextVertexes = $this->getNextVertexes($currentVertex, $filter->getPassCondition($currentContext)); |
115 | 115 | $i = 0; |
116 | - foreach($nextVertexes as $edge => $vertex) { |
|
116 | + foreach ($nextVertexes as $edge => $vertex) { |
|
117 | 117 | $currentBranchContext = $currentContext->getBranchContext(); |
118 | - if(count($nextVertexes) > 1 && $i > 0) { |
|
118 | + if (count($nextVertexes) > 1 && $i > 0) { |
|
119 | 119 | $nextBranchContext = $this->createBranchContext( |
120 | 120 | ++$lastBranchIndex, |
121 | 121 | $currentBranchContext->getIndex(), |