@@ -47,12 +47,12 @@ discard block |
||
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 |
||
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() |
@@ -60,15 +60,15 @@ discard block |
||
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 |
||
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(), |