Passed
Pull Request — master (#113)
by
unknown
09:00
created
renderer.php 1 patch
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -353,8 +353,7 @@  discard block
 block discarded – undo
353 353
 				}
354 354
 				$node->attr('data-sln', $start_line_numbers_at);
355 355
 				$node->attr('data-sln-old', $start_line_numbers_at);
356
-			}
357
-			else
356
+			} else
358 357
 			{
359 358
 				$node->attr('data-sln-old', '1');
360 359
 			}		
@@ -364,8 +363,12 @@  discard block
 block discarded – undo
364 363
 				asort($ext['highlight_lines_extra']);
365 364
 				foreach($ext['highlight_lines_extra'] as $hle)
366 365
 				{
367
-					if ($str) $str .= ',';
368
-					if ($start_line_numbers_at > 0) $hle += $start_line_numbers_at - 1;
366
+					if ($str) {
367
+					    $str .= ',';
368
+					}
369
+					if ($start_line_numbers_at > 0) {
370
+					    $hle += $start_line_numbers_at - 1;
371
+					}
369 372
 					$str .= $hle;
370 373
 				}
371 374
 				$node->attr('data-hle', $str);
Please login to merge, or discard this patch.
parser/CodeBlockNode.php 1 patch
Braces   +23 added lines, -18 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@  discard block
 block discarded – undo
32 32
 			if (is_numeric($sln_old))
33 33
 			{
34 34
 				$sln_old = (int) $sln_old;
35
-			}
36
-			else
35
+			} else
37 36
 			{
38 37
 				$sln_old = 1;
39 38
 			}
@@ -44,13 +43,13 @@  discard block
 block discarded – undo
44 43
 			if (is_numeric($start_line_numbers_at))
45 44
 			{
46 45
 				$start_line_numbers_at = (int) $start_line_numbers_at;
47
-				if ($start_line_numbers_at > 0) 
48
-					$extraTag .= 'enable_line_numbers="true", ';
49
-				else
50
-					$extraTag .= 'enable_line_numbers="false", ';
46
+				if ($start_line_numbers_at > 0) {
47
+									$extraTag .= 'enable_line_numbers="true", ';
48
+				} else {
49
+									$extraTag .= 'enable_line_numbers="false", ';
50
+				}
51 51
 				$extraTag .= 'start_line_numbers_at="' . abs($start_line_numbers_at) .'"';
52
-			}
53
-			else
52
+			} else
54 53
 			{
55 54
 				$extraTag = 'enable_line_numbers="false"';
56 55
 			}
@@ -62,26 +61,32 @@  discard block
 block discarded – undo
62 61
 			$str = '';
63 62
 			foreach($arr as $val)
64 63
 			{
65
-				if ($str) $str .= ',';
64
+				if ($str) {
65
+				    $str .= ',';
66
+				}
66 67
 				if (is_numeric($val)) 
67 68
 				{	
68 69
 					$ival = (int) $val;
69
-					if ($sln_old > 0 && $ival > 0)
70
-						$str .= $ival - $sln_old + 1;
71
-					else
72
-						$str .= abs($ival);
70
+					if ($sln_old > 0 && $ival > 0) {
71
+											$str .= $ival - $sln_old + 1;
72
+					} else {
73
+											$str .= abs($ival);
74
+					}
73 75
 				}
74 76
 			}
75 77
 			if ($str)
76 78
 			{
77
-				if (!$extraTag)
78
-					$extraTag = '[';
79
-				else 
80
-					$extraTag .= ', ';
79
+				if (!$extraTag) {
80
+									$extraTag = '[';
81
+				} else {
82
+									$extraTag .= ', ';
83
+				}
81 84
 				$extraTag .= 'highlight_lines_extra="' . $str . '"';
82 85
 			}
83 86
 		}
84
-		if ($extraTag) $openingTag .= ' [' . $extraTag . ']';
87
+		if ($extraTag) {
88
+		    $openingTag .= ' [' . $extraTag . ']';
89
+		}
85 90
 
86 91
         $openingTag .= '>';
87 92
         return $openingTag . "\n" . $this->data['content'][0]['text'] . "\n</code>";
Please login to merge, or discard this patch.