@@ -21,8 +21,8 @@ discard block |
||
| 21 | 21 | public static function getBranches(Generator $contexts, ?callable $callback = null): array |
| 22 | 22 | { |
| 23 | 23 | $branchMap = []; |
| 24 | - foreach($contexts as $context) { |
|
| 25 | - if(is_callable($callback)) { |
|
| 24 | + foreach ($contexts as $context) { |
|
| 25 | + if (is_callable($callback)) { |
|
| 26 | 26 | $callback($context, $contexts); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -31,8 +31,8 @@ discard block |
||
| 31 | 31 | $parentBranchIndex = $context->getBranchContext()->getParentIndex(); |
| 32 | 32 | $vertex = $context->getVertex(); |
| 33 | 33 | |
| 34 | - if(!isset($branchMap[$branchIndex])) { |
|
| 35 | - if(isset($branchMap[$parentBranchIndex])) { |
|
| 34 | + if (!isset($branchMap[$branchIndex])) { |
|
| 35 | + if (isset($branchMap[$parentBranchIndex])) { |
|
| 36 | 36 | $parentBranch = $branchMap[$parentBranchIndex]; |
| 37 | 37 | $key = array_search($branchContext->getStart(), $parentBranch); |
| 38 | 38 | $branchMap[$branchIndex] = array_slice($parentBranch, 0, $key+1); |