Completed
Push — master ( 509c61...616fc2 )
by Vladimir
02:58
created
src/allejo/stakx/Twig/TableOfContentsFilter.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,22 +45,26 @@
 block discarded – undo
45 45
 
46 46
             sscanf($heading->getName(), 'h%u', $curr);
47 47
 
48
-            if (!($hMin <= $curr && $curr <= $hMax)) {
48
+            if (!($hMin <= $curr && $curr <= $hMax))
49
+            {
49 50
                 continue;
50 51
             }
51 52
 
52 53
             $headingID = $heading->attributes()->id;
53 54
 
54 55
             // If the current level is greater than the last level indent one level
55
-            if ($curr > $last) {
56
+            if ($curr > $last)
57
+            {
56 58
                 $toc .= '<ul>';
57 59
             }
58 60
             // If the current level is less than the last level go up appropriate amount.
59
-            elseif ($curr < $last) {
61
+            elseif ($curr < $last)
62
+            {
60 63
                 $toc .= str_repeat('</li></ul>', $last - $curr) . '</li>';
61 64
             }
62 65
             // If the current level is equal to the last.
63
-            else {
66
+            else
67
+            {
64 68
                 $toc .= '</li>';
65 69
             }
66 70
 
Please login to merge, or discard this patch.