Passed
Push — 2.x ( 44da33...f0bfd9 )
by Terry
01:53
created
src/Firewall/Helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
167 167
         $masked = implode('.', $tmp);
168 168
 
169 169
     } else {
170
-        $masked =  str_repeat('*', strlen($str) - 6) . substr(str, -6);
170
+        $masked = str_repeat('*', strlen($str) - 6) . substr(str, -6);
171 171
     }
172 172
 
173 173
     return $masked;
Please login to merge, or discard this patch.
src/Firewall/Panel/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 
57 57
             if (
58 58
                 // Default password, unencrypted.
59
-                $admin['user']  === $postParams['s_user'] && 
59
+                $admin['user'] === $postParams['s_user'] && 
60 60
                 'shieldon_pass' === $postParams['s_pass'] &&
61 61
                 'shieldon_pass' === $admin['pass']
62 62
             ) {
Please login to merge, or discard this patch.
templates/panel/overview.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
                 <div class="filter-status">
204 204
                     <div class="heading"><?php _e('panel', 'overview_label_action_logger', 'Action Logger'); ?></div>
205 205
                     <div class="nums">
206
-                        <?php echo $data['action_logger']  ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?>
206
+                        <?php echo $data['action_logger'] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?>
207 207
                     </div>
208 208
                     <div class="note"><?php _e('panel', 'overview_note_action_logger', 'Record every visitor’s behavior.'); ?></div>
209 209
                 </div>
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
                 <div class="filter-status">
223 223
                     <div class="heading"><?php _e('panel', 'overview_label_recaptcha', 'reCAPTCHA'); ?></div>
224 224
                     <div class="nums">
225
-                        <?php echo $captcha['recaptcha']  ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?>
225
+                        <?php echo $captcha['recaptcha'] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?>
226 226
                     </div>
227 227
                     <div class="note"><?php _e('panel', 'overview_note_recaptcha', 'Provided by Google.'); ?></div>
228 228
                 </div>
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
                 <div class="filter-status">
232 232
                     <div class="heading"><?php _e('panel', 'overview_label_image_captcha', 'Image Captcha'); ?></div>
233 233
                     <div class="nums">
234
-                        <?php echo $captcha['imagecaptcha']  ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?>
234
+                        <?php echo $captcha['imagecaptcha'] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?>
235 235
                     </div>
236 236
                     <div class="note"><?php _e('panel', 'overview_note_image_captcha', 'A simple text-in-image Captcha.'); ?></div>
237 237
                 </div>
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
                 <div class="filter-status">
252 252
                     <div class="heading"><?php _e('panel', 'overview_label_' . $k, ''); ?></div>
253 253
                     <div class="nums">
254
-                        <?php echo $messengers[$k]  ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?>
254
+                        <?php echo $messengers[$k] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?>
255 255
                     </div>
256 256
                     <div class="note"><?php _e('panel', 'overview_note_' . $k, ''); ?></div>
257 257
                 </div>
Please login to merge, or discard this patch.
src/Firewall/Panel/Ajax.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
      *
49 49
      * @return bool
50 50
      */
51
-    public function  __call($function , $args)
51
+    public function  __call($function, $args)
52 52
     {
53 53
         $className = 'Shieldon\Firewall\Panel\Sandbox\\' . $function;
54 54
 
Please login to merge, or discard this patch.
src/Firewall/Panel/Home.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -236,11 +236,11 @@
 block discarded – undo
236 236
     private function overviewTemplateVarsOfComponents(array $data = []): array
237 237
     {
238 238
         $data['components'] = [
239
-            'Ip'         => (!empty($this->kernel->component['Ip']))         ? true : false,
239
+            'Ip'         => (!empty($this->kernel->component['Ip'])) ? true : false,
240 240
             'TrustedBot' => (!empty($this->kernel->component['TrustedBot'])) ? true : false,
241
-            'Header'     => (!empty($this->kernel->component['Header']))     ? true : false,
242
-            'Rdns'       => (!empty($this->kernel->component['Rdns']))       ? true : false,
243
-            'UserAgent'  => (!empty($this->kernel->component['UserAgent']))  ? true : false,
241
+            'Header'     => (!empty($this->kernel->component['Header'])) ? true : false,
242
+            'Rdns'       => (!empty($this->kernel->component['Rdns'])) ? true : false,
243
+            'UserAgent'  => (!empty($this->kernel->component['UserAgent'])) ? true : false,
244 244
         ];
245 245
 
246 246
         return $data;
Please login to merge, or discard this patch.
src/Firewall/Panel/Report.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                 $data['period_data'] = $ipDetailsCachedData['period_data'];
128 128
                 $lastCachedTime = date('Y-m-d H:i:s', $ipDetailsCachedData['time']);
129 129
     
130
-                if ('today' === $type ) {
130
+                if ('today' === $type) {
131 131
                     $ipDetailsCachedData = $logCacheHandler->get('past_seven_hours');
132 132
                     $data['past_seven_hours'] = $ipDetailsCachedData['period_data'];
133 133
                 }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
                 $logCacheHandler->save($type, $data);
143 143
     
144
-                if ('today' === $type ) {
144
+                if ('today' === $type) {
145 145
                     $this->parser->prepare('past_seven_hours');
146 146
                     $data['past_seven_hours'] = $this->parser->getParsedPeriodData();
147 147
 
@@ -172,11 +172,11 @@  discard block
 block discarded – undo
172 172
     private function operationTemplateVarsOfComponents(array $data = []): array
173 173
     {
174 174
         $data['components'] = [
175
-            'Ip'         => (!empty($this->kernel->component['Ip']))         ? true : false,
175
+            'Ip'         => (!empty($this->kernel->component['Ip'])) ? true : false,
176 176
             'TrustedBot' => (!empty($this->kernel->component['TrustedBot'])) ? true : false,
177
-            'Header'     => (!empty($this->kernel->component['Header']))     ? true : false,
178
-            'Rdns'       => (!empty($this->kernel->component['Rdns']))       ? true : false,
179
-            'UserAgent'  => (!empty($this->kernel->component['UserAgent']))  ? true : false,
177
+            'Header'     => (!empty($this->kernel->component['Header'])) ? true : false,
178
+            'Rdns'       => (!empty($this->kernel->component['Rdns'])) ? true : false,
179
+            'UserAgent'  => (!empty($this->kernel->component['UserAgent'])) ? true : false,
180 180
         ];
181 181
 
182 182
         return $data;
Please login to merge, or discard this patch.
templates/panel/template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 if (
98 98
     isset($_SERVER['HTTP_HOST']) && 
99 99
     strpos($_SERVER['HTTP_HOST'], 'project.lo') !== false
100
-)  {
100
+) {
101 101
     // `shieldon-doc.lo` is the virtual domain that Terry is using to design CSS for Firewall Panel UI.
102 102
     $staticSrc = 'http://shieldon-doc.lo/static';
103 103
 }
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
                 </div>
331 331
             </div>
332 332
         </div>
333
-        <?php if (! empty($this->messages)) : ?>
333
+        <?php if (!empty($this->messages)) : ?>
334 334
         <div id="message-modal" class="modal fade" tabindex="-1" role="dialog">
335 335
             <div class="modal-dialog modal-dialog-centered modal-lightbox" role="document">
336 336
                 <div class="modal-content">
Please login to merge, or discard this patch.
src/Firewall/Driver/FileDriver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -356,8 +356,8 @@
 block discarded – undo
356 356
         $path = [];
357 357
 
358 358
         $path['filter'] = $this->directory . '/' . $this->tableFilterLogs . '/' . $ip . '.' . $this->extension;
359
-        $path['session'] = $this->directory . '/' . $this->tableSessions   . '/' . $ip . '.' . $this->extension;
360
-        $path['rule'] = $this->directory . '/' . $this->tableRuleList   . '/' . $ip . '.' . $this->extension;
359
+        $path['session'] = $this->directory . '/' . $this->tableSessions . '/' . $ip . '.' . $this->extension;
360
+        $path['rule'] = $this->directory . '/' . $this->tableRuleList . '/' . $ip . '.' . $this->extension;
361 361
 
362 362
         return $path[$type] ?? '';
363 363
     }
Please login to merge, or discard this patch.
src/Firewall/Driver/SqlDriverProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 
303 303
         // @codeCoverageIgnoreStart
304 304
         
305
-        } catch(Exception $e) {
305
+        } catch (Exception $e) {
306 306
             return false;
307 307
         }
308 308
 
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 
362 362
         // @codeCoverageIgnoreStart
363 363
 
364
-        } catch(Exception $e) {
364
+        } catch (Exception $e) {
365 365
             return false;
366 366
         }
367 367
 
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 
415 415
         // @codeCoverageIgnoreStart
416 416
 
417
-        } catch(Exception $e) {
417
+        } catch (Exception $e) {
418 418
             return false;
419 419
         }
420 420
 
Please login to merge, or discard this patch.