Passed
Push — master ( adc57f...3d0d7c )
by Smoren
02:04
created
src/Traverse/Traverse.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -88,24 +88,24 @@  discard block
 block discarded – undo
88 88
         $globalPassedVertexesMap = $startContext->getGlobalPassedVertexesMap();
89 89
         $contexts = $this->createContextCollection($traverseMode, $startContext);
90 90
 
91
-        while(count($contexts)) {
91
+        while (count($contexts)) {
92 92
             /** @var TraverseContextInterface $currentContext */
93 93
             $currentContext = $contexts->pop();
94 94
             $currentVertex = $currentContext->getVertex();
95 95
 
96 96
             $customPassCondition = null;
97 97
             $nextVertex = null;
98
-            if($filter->matchesHandleCondition($currentContext)) {
98
+            if ($filter->matchesHandleCondition($currentContext)) {
99 99
                 $cmd = (yield $currentContext);
100 100
 
101
-                if($cmd instanceof FilterConditionInterface) {
101
+                if ($cmd instanceof FilterConditionInterface) {
102 102
                     $customPassCondition = $cmd;
103 103
                     yield $currentContext;
104
-                } elseif($cmd instanceof VertexInterface) {
104
+                } elseif ($cmd instanceof VertexInterface) {
105 105
                     $nextVertex = $cmd;
106 106
                     yield $currentContext;
107 107
                 } else {
108
-                    switch($cmd) {
108
+                    switch ($cmd) {
109 109
                         case static::STOP_BRANCH:
110 110
                             yield $currentContext;
111 111
                             continue 2;
@@ -127,9 +127,9 @@  discard block
 block discarded – undo
127 127
             }
128 128
 
129 129
             $i = 0;
130
-            foreach($nextVertexes as $edge => $vertex) {
130
+            foreach ($nextVertexes as $edge => $vertex) {
131 131
                 $currentBranchContext = $currentContext->getBranchContext();
132
-                if(count($nextVertexes) > 1 && $i > 0) {
132
+                if (count($nextVertexes) > 1 && $i > 0) {
133 133
                     $nextBranchContext = $this->createBranchContext(
134 134
                         ++$lastBranchIndex,
135 135
                         $currentBranchContext->getIndex(),
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         int $traverseMode,
179 179
         TraverseContextInterface $startContext
180 180
     ): Collection {
181
-        if($traverseMode === self::MODE_WIDE) {
181
+        if ($traverseMode === self::MODE_WIDE) {
182 182
             $contexts = new Queue([$startContext]);
183 183
         } else {
184 184
             $contexts = new Stack([$startContext]);
Please login to merge, or discard this patch.