Passed
Push — master ( 73c04c...2087f9 )
by Smoren
01:52
created
src/Traverse/Traverse.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,15 +87,15 @@  discard block
 block discarded – undo
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
             $currentEdge = $currentContext->getEdge();
95 95
 
96
-            if($filter->matchesHandleCondition($currentContext)) {
96
+            if ($filter->matchesHandleCondition($currentContext)) {
97 97
                 $cmd = (yield $currentEdge => $currentContext);
98
-                switch($cmd) {
98
+                switch ($cmd) {
99 99
                     case static::STOP_BRANCH:
100 100
                         yield $currentEdge => $currentContext;
101 101
                         continue 2;
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
 
111 111
             $nextVertexes = $this->getNextVertexes($currentVertex, $filter->getPassCondition($currentContext));
112 112
             $i = 0;
113
-            foreach($nextVertexes as $edge => $vertex) {
113
+            foreach ($nextVertexes as $edge => $vertex) {
114 114
                 $currentBranchContext = $currentContext->getBranchContext();
115
-                if(count($nextVertexes) > 1 && $i > 0) {
115
+                if (count($nextVertexes) > 1 && $i > 0) {
116 116
                     $nextBranchContext = $this->createBranchContext(
117 117
                         ++$lastBranchIndex,
118 118
                         $currentBranchContext->getIndex(),
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         int $traverseMode,
162 162
         TraverseContextInterface $startContext
163 163
     ): Collection {
164
-        if($traverseMode === self::MODE_WIDE) {
164
+        if ($traverseMode === self::MODE_WIDE) {
165 165
             $contexts = new Queue([$startContext]);
166 166
         } else {
167 167
             $contexts = new Stack([$startContext]);
Please login to merge, or discard this patch.