Passed
Push — 2.x ( da3964...4ff14b )
by Terry
01:53
created
templates/panel/js/chart.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     var captchaCount = <?php echo ($period_data['captcha_count'] ?? 0); ?>;
18 18
 
19 19
     // Today
20
-    <?php if (! empty($past_seven_hours)) : ?>
20
+    <?php if (!empty($past_seven_hours)) : ?>
21 21
     var pageviewChartString = [<?php echo ($past_seven_hours['pageview_chart_string'] ?? ''); ?>];
22 22
     var captchaChartString = [<?php echo ($past_seven_hours['captcha_chart_string'] ?? ''); ?>];
23 23
     var labelChartString = [<?php echo ($past_seven_hours['label_chart_string'] ?? ''); ?>];
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,11 @@
 block discarded – undo
21 21
     var pageviewChartString = [<?php echo ($past_seven_hours['pageview_chart_string'] ?? ''); ?>];
22 22
     var captchaChartString = [<?php echo ($past_seven_hours['captcha_chart_string'] ?? ''); ?>];
23 23
     var labelChartString = [<?php echo ($past_seven_hours['label_chart_string'] ?? ''); ?>];
24
-    <?php else : ?>
25
-    var pageviewChartString = [<?php echo ($period_data['pageview_chart_string'] ?? ''); ?>];
24
+    <?php else {
25
+    : ?>
26
+    var pageviewChartString = [<?php echo ($period_data['pageview_chart_string'] ?? '');
27
+}
28
+?>];
26 29
     var captchaChartString = [<?php echo ($period_data['captcha_chart_string'] ?? ''); ?>];
27 30
     var labelChartString = [<?php echo ($period_data['label_chart_string'] ?? ''); ?>];
28 31
     <?php endif; ?>
Please login to merge, or discard this patch.
templates/panel/ip_manager.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         </div>
58 58
     </div>
59 59
     <br />
60
-    <?php if ( empty($ip_list)) : ?>
60
+    <?php if (empty($ip_list)) : ?>
61 61
     <div id="so-table-container" class="so-datatables">
62 62
         <table id="so-datalog" class="cell-border compact stripe responsive" cellspacing="0" width="100%">
63 63
             <tbody>
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
                 </tr>
93 93
             </thead>
94 94
             <tbody>
95
-                <?php if (! empty($ip_list)) : ?>
96
-                <?php foreach($ip_list as $i => $ipInfo) : ?>
95
+                <?php if (!empty($ip_list)) : ?>
96
+                <?php foreach ($ip_list as $i => $ipInfo) : ?>
97 97
                 <tr>
98 98
                     <td><?php echo $i + 1; ?></td>
99 99
                     <td><?php echo $ipInfo['url']; ?></td>
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     </div>
116 116
 </div>
117 117
 
118
-<?php if (! empty($ip_list)) : ?>
118
+<?php if (!empty($ip_list)) : ?>
119 119
 
120 120
 <script>
121 121
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,8 @@  discard block
 block discarded – undo
69 69
             </tbdoy>
70 70
         </table>
71 71
     </div>
72
-    <?php else: ?>
72
+    <?php else {
73
+    : ?>
73 74
     <div id="so-table-loading" class="so-datatables">
74 75
         <div class="lds-css ng-scope">
75 76
             <div class="lds-ripple">
@@ -78,7 +79,9 @@  discard block
 block discarded – undo
78 79
             </div>
79 80
         </div>
80 81
     </div>
81
-    <?php endif; ?>
82
+    <?php endif;
83
+}
84
+?>
82 85
 
83 86
     <div id="so-table-container" class="so-datatables" style="display: none;">
84 87
         <table id="so-datalog" class="cell-border compact stripe responsive" cellspacing="0" width="100%">
Please login to merge, or discard this patch.
templates/panel/xss_protection.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         </div>
112 112
     </div>
113 113
     <br />
114
-    <?php if ( empty($xss_protected_list)) : ?>
114
+    <?php if (empty($xss_protected_list)) : ?>
115 115
     <div id="so-table-container" class="so-datatables">
116 116
         <table id="so-datalog" class="cell-border compact stripe responsive" cellspacing="0" width="100%">
117 117
             <tbody>
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
                 </tr>
144 144
             </thead>
145 145
             <tbody>
146
-                <?php if (! empty($xss_protected_list)) : ?>
147
-                <?php foreach($xss_protected_list as $i => $info) : ?>
146
+                <?php if (!empty($xss_protected_list)) : ?>
147
+                <?php foreach ($xss_protected_list as $i => $info) : ?>
148 148
                 <tr>
149 149
                     <td><?php echo $info['type']; ?></td>
150 150
                     <td><?php echo $info['variable']; ?></td>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,8 @@  discard block
 block discarded – undo
62 62
             </tbdoy>
63 63
         </table>
64 64
     </div>
65
-    <?php else: ?>
65
+    <?php else {
66
+    : ?>
66 67
     <div id="so-table-loading" class="so-datatables">
67 68
         <div class="lds-css ng-scope">
68 69
             <div class="lds-ripple">
@@ -71,7 +72,9 @@  discard block
 block discarded – undo
71 72
             </div>
72 73
         </div>
73 74
     </div>
74
-    <?php endif; ?>
75
+    <?php endif;
76
+}
77
+?>
75 78
     <div id="so-table-container" class="so-datatables" style="display: none;">
76 79
         <table id="so-datalog" class="cell-border compact stripe responsive" cellspacing="0" width="100%">
77 80
             <thead>
Please login to merge, or discard this patch.
templates/panel/table_sessions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             </div>
36 36
             <div class="board-field right">
37 37
                 <div class="heading"><?php _e('panel', 'table_heading_period', 'Period'); ?></div>
38
-                <div class="nums"><?php echo number_format($session_limit_period ); ?></div>
38
+                <div class="nums"><?php echo number_format($session_limit_period); ?></div>
39 39
                 <div class="note"><?php _e('panel', 'table_note_period', 'Keep-alive period. (minutes)'); ?></div>
40 40
             </div>
41 41
         </div>
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             </div>
46 46
             <div class="board-field right">
47 47
                 <div class="heading"><?php _e('panel', 'table_heading_online', 'Online'); ?></div>
48
-                <div class="nums"><?php echo number_format($online_count ); ?></div>
48
+                <div class="nums"><?php echo number_format($online_count); ?></div>
49 49
                 <div class="note"><?php _e('panel', 'table_note_online', 'Online session amount.'); ?></div>
50 50
             </div>
51 51
         </div>
@@ -80,19 +80,19 @@  discard block
 block discarded – undo
80 80
             <tbody>
81 81
 
82 82
                 <?php $i = 1; ?>
83
-                <?php foreach($session_list as $key => $sessionInfo) : ?>
83
+                <?php foreach ($session_list as $key => $sessionInfo) : ?>
84 84
                     <?php
85 85
 
86 86
                         $remainsTime = $expires - (time() - $sessionInfo['time']);
87 87
 
88
-                        if ($remainsTime < 1 ) {
88
+                        if ($remainsTime < 1) {
89 89
                             $remainsTime = 0;
90 90
                         }
91 91
 
92
-                        if ($i < $session_limit_count ) {
92
+                        if ($i < $session_limit_count) {
93 93
                             $satusName = __('panel', 'table_text_allowable', 'Allowable');
94 94
 
95
-                            if ($remainsTime < 1 ) {
95
+                            if ($remainsTime < 1) {
96 96
                                 $satusName = __('panel', 'table_text_expired', 'Expired');
97 97
                             }
98 98
                         } else {
Please login to merge, or discard this patch.
templates/frontend/login.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 				<div class="card-body">
116 116
                     <form action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post" autocomplete="off">
117 117
                         <div class="main-content">
118
-                            <?php if (! empty($error)) : ?>
118
+                            <?php if (!empty($error)) : ?>
119 119
                             <div class="error-notice">
120 120
                                 <?php echo $error; ?>
121 121
                             </div>
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
                             <div class="input-box">
127 127
                                 <input type="password" name="s_pass" placeholder="Password" class="form-input" />
128 128
                             </div>
129
-                            <?php if (! empty($this->captcha)) : ?>
129
+                            <?php if (!empty($this->captcha)) : ?>
130 130
                             <div class="input-box">
131 131
                                 <?php foreach ($this->captcha as $captcha) : ?>
132 132
                                     <?php echo $captcha->form(); ?>
Please login to merge, or discard this patch.
templates/frontend/rejection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@
 block discarded – undo
37 37
                             <?php _e('core', 'deny_message', 'The IP address you are using has been blocked.') ?>
38 38
 						</div>
39 39
                     </div>
40
-					<?php if (! empty($dialoguserinfo)) : ?>
40
+					<?php if (!empty($dialoguserinfo)) : ?>
41 41
 						<div class="status-user-info">
42
-							<?php foreach($dialoguserinfo as $key => $userinfo) : ?>
42
+							<?php foreach ($dialoguserinfo as $key => $userinfo) : ?>
43 43
 								<div class="row">
44 44
 									<strong><?php echo $key; ?></strong> <span><?php echo $userinfo; ?></span>
45 45
 								</div>
Please login to merge, or discard this patch.
templates/frontend/captcha.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@
 block discarded – undo
46 46
 							<p><input type="submit" value="<?php _e('core', 'stop_submit', 'Submit') ?>" /></p>
47 47
 						</form>
48 48
 					</div>
49
-					<?php if (! empty($dialoguserinfo)) : ?>
49
+					<?php if (!empty($dialoguserinfo)) : ?>
50 50
 						<div class="status-user-info">
51
-							<?php foreach($dialoguserinfo as $key => $userinfo) : ?>
51
+							<?php foreach ($dialoguserinfo as $key => $userinfo) : ?>
52 52
 								<div class="row">
53 53
 									<strong><?php echo $key; ?></strong> <span><?php echo $userinfo; ?></span>
54 54
 								</div>
Please login to merge, or discard this patch.
src/Firewall/Captcha/ImageCaptcha.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -201,13 +201,12 @@  discard block
 block discarded – undo
201 201
         $imgHeight = $this->properties['img_height'];
202 202
 
203 203
         // Determine angle and position.
204
-        $length	= strlen($this->word);
204
+        $length = strlen($this->word);
205 205
         $angle = ($length >= 6) ?mt_rand(-($length - 6), ($length - 6)) : 0;
206 206
         $xAxis = mt_rand(6, (360 / $length) - 16);
207 207
 
208 208
         $yAxis = ($angle >= 0) ? 
209
-            mt_rand($imgHeight, $imgWidth) : 
210
-            mt_rand(6, $imgHeight);
209
+            mt_rand($imgHeight, $imgWidth) : mt_rand(6, $imgHeight);
211 210
 
212 211
         // Create image.
213 212
         if (function_exists('imagecreatetruecolor')) {
@@ -258,7 +257,7 @@  discard block
 block discarded – undo
258 257
         $y = 0;
259 258
 
260 259
         for ($i = 0; $i < $length; $i++) {
261
-            $y = mt_rand(0 , $imgHeight / 2);
260
+            $y = mt_rand(0, $imgHeight / 2);
262 261
             imagestring($im, 5, $x, $y, $this->word[$i], $colors['text']);
263 262
             $x += ($this->properties['font_spacing'] * 2);
264 263
         }
@@ -267,7 +266,7 @@  discard block
 block discarded – undo
267 266
         imagerectangle($im, 0, 0, $imgWidth - 1, $imgHeight - 1, $colors['border']);
268 267
 
269 268
         // Generate image in base64 string.
270
-        ob_start ();
269
+        ob_start();
271 270
 
272 271
         if (function_exists('imagejpeg')) {
273 272
             $this->imageType = 'jpeg';
Please login to merge, or discard this patch.
src/Firewall/Driver/SqliteDriver.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@
 block discarded – undo
27 27
         parent::__construct($pdo, $debug);
28 28
     }
29 29
 
30
-      /**
31
-     * Create SQL tables that Shieldon needs.
32
-     *
33
-     * @return bool
34
-     */
30
+        /**
31
+         * Create SQL tables that Shieldon needs.
32
+         *
33
+         * @return bool
34
+         */
35 35
     protected function installSql(): bool
36 36
     {
37 37
         try {
Please login to merge, or discard this patch.