Passed
Push — master ( f13cb7...19eee0 )
by Smoren
01:48
created
src/Filters/ConstTraverseFilter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
     {
48 48
         $passCondition = $this->passCondition;
49 49
 
50
-        if(
50
+        if (
51 51
             $this->config->isOn(FilterConfig::PREVENT_LOOP_PASS)
52 52
             && $context->isLoop()
53 53
         ) {
54 54
             $passCondition = (clone $this->passCondition)->onlyVertexTypes([]);
55
-        } elseif(
55
+        } elseif (
56 56
             $this->config->isOn(FilterConfig::PREVENT_RETURN_BACK)
57 57
             && ($prevVertex = $context->getPrevVertex()) !== null
58 58
         ) {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $handleCondition = $this->handleCondition;
72 72
         $globalPassed = $context->getGlobalPassedVertexesMap();
73 73
 
74
-        if(
74
+        if (
75 75
             (
76 76
                 $this->config->isOn(FilterConfig::PREVENT_LOOP_HANDLE)
77 77
                 && $context->isLoop()
Please login to merge, or discard this patch.
src/Components/Traverse.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,15 +60,15 @@  discard block
 block discarded – undo
60 60
         $globalPassedVertexesMap = $startContext->getGlobalPassedVertexesMap();
61 61
 
62 62
         $contexts = new Queue([$startContext]);
63
-        while(count($contexts)) {
63
+        while (count($contexts)) {
64 64
             /** @var TraverseContextInterface $currentContext */
65 65
             $currentContext = $contexts->pop();
66 66
             $currentVertex = $currentContext->getVertex();
67 67
             $currentEdge = $currentContext->getEdge();
68 68
 
69
-            if($filter->getHandleCondition($currentContext)->isSuitableVertex($currentContext->getVertex())) {
69
+            if ($filter->getHandleCondition($currentContext)->isSuitableVertex($currentContext->getVertex())) {
70 70
                 $cmd = (yield $currentEdge => $currentContext);
71
-                switch($cmd) {
71
+                switch ($cmd) {
72 72
                     case static::STOP_BRANCH:
73 73
                         yield $currentEdge => $currentContext;
74 74
                         continue 2;
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
 
84 84
             $nextVertexes = $this->getNextVertexes($currentVertex, $filter->getPassCondition($currentContext));
85 85
             $i = 0;
86
-            foreach($nextVertexes as $edge => $vertex) {
86
+            foreach ($nextVertexes as $edge => $vertex) {
87 87
                 $currentBranchContext = $currentContext->getBranchContext();
88
-                if(count($nextVertexes) > 1 && $i > 0) {
88
+                if (count($nextVertexes) > 1 && $i > 0) {
89 89
                     $nextBranchContext = $this->createBranchContext(
90 90
                         ++$lastBranchIndex,
91 91
                         $currentBranchContext->getIndex(),
Please login to merge, or discard this patch.