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