Passed
Push — 2.x ( 3c49c1...b272d3 )
by Terry
02:18
created
templates/panel/table_sessions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             </div>
50 50
             <div class="board-field right">
51 51
                 <div class="heading"><?php _e('panel', 'table_heading_period', 'Period'); ?></div>
52
-                <div class="nums"><?php echo number_format($session_limit_period ); ?></div>
52
+                <div class="nums"><?php echo number_format($session_limit_period); ?></div>
53 53
                 <div class="note"><?php _e('panel', 'table_note_period', 'Keep-alive period. (minutes)'); ?></div>
54 54
             </div>
55 55
         </div>
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             </div>
60 60
             <div class="board-field right">
61 61
                 <div class="heading"><?php _e('panel', 'table_heading_online', 'Online'); ?></div>
62
-                <div class="nums"><?php echo number_format($online_count ); ?></div>
62
+                <div class="nums"><?php echo number_format($online_count); ?></div>
63 63
                 <div class="note"><?php _e('panel', 'table_note_online', 'Online user amount.'); ?></div>
64 64
             </div>
65 65
         </div>
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
 
100 100
                         $remainsTime = $expires - (time() - $sessionInfo['time']);
101 101
 
102
-                        if ($remainsTime < 1 ) {
102
+                        if ($remainsTime < 1) {
103 103
                             $remainsTime = 0;
104 104
                         }
105 105
 
106
-                        if ($i < $session_limit_count ) {
106
+                        if ($i < $session_limit_count) {
107 107
                             $satusName = __('panel', 'table_text_allowable', 'Allowable');
108 108
 
109
-                            if ($remainsTime < 1 ) {
109
+                            if ($remainsTime < 1) {
110 110
                                 $satusName = __('panel', 'table_text_expired', 'Expired');
111 111
                             }
112 112
                         } else {
Please login to merge, or discard this patch.
src/Firewall/Kernel/TemplateTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -321,8 +321,8 @@
 block discarded – undo
321 321
         $statStart = Container::get('shieldon_start');
322 322
         $statEnd = Container::get('shieldon_end');
323 323
 
324
-        $startTimeArr = explode(' ',$statStart['time']);
325
-        $endTimeArr = explode(' ',$statStart['time']);
324
+        $startTimeArr = explode(' ', $statStart['time']);
325
+        $endTimeArr = explode(' ', $statStart['time']);
326 326
 
327 327
         $timeDifference = ($endTimeArr[1] - $startTimeArr[1]) + ($endTimeArr[0] - $startTimeArr[0]);
328 328
         $memoryDifference = round(($statEnd['memory'] - $statStart['memory']) / 1024, 2); // KB
Please login to merge, or discard this patch.
src/Firewall/Kernel/DriverTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
             $this->driver->setChannel($channel);
106 106
         } else {
107 107
             Event::AddListener('set_driver',
108
-                function ($args) use ($channel) {
108
+                function($args) use ($channel) {
109 109
                     $args['driver']->setChannel($channel);
110 110
                 }
111 111
             );
Please login to merge, or discard this patch.
src/Firewall/Firewall/SetupTrait.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 
315 315
         foreach ($ipList as $ip) {
316 316
 
317
-            if (0 === strpos($this->kernel->getCurrentUrl(), $ip['url']) ) {
317
+            if (0 === strpos($this->kernel->getCurrentUrl(), $ip['url'])) {
318 318
 
319 319
                 if ('allow' === $ip['rule']) {
320 320
                     $allowedList[] = $ip['ip'];
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
         $this->kernel->setProperty(
377 377
             'deny_attempt_enable',
378 378
             [
379
-                'data_circle'     => $setting['data_circle']['enable'],     // false   
379
+                'data_circle'     => $setting['data_circle']['enable'], // false   
380 380
                 'system_firewall' => $setting['system_firewall']['enable'], // false   
381 381
             ]
382 382
         );
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
         $this->kernel->setProperty(
385 385
             'deny_attempt_buffer',
386 386
             [
387
-                'data_circle'     => $setting['data_circle']['buffer'],     // 10
387
+                'data_circle'     => $setting['data_circle']['buffer'], // 10
388 388
                 'system_firewall' => $setting['system_firewall']['buffer'], // 10
389 389
             ]
390 390
         );
@@ -429,8 +429,8 @@  discard block
 block discarded – undo
429 429
 
430 430
         if ($sessionLimitSetting['enable']) {
431 431
 
432
-            $onlineUsers = $sessionLimitSetting['config']['count'];       // default: 100
433
-            $alivePeriod = $sessionLimitSetting['config']['period'];      // default: 300
432
+            $onlineUsers = $sessionLimitSetting['config']['count']; // default: 100
433
+            $alivePeriod = $sessionLimitSetting['config']['period']; // default: 300
434 434
             $isUniqueIp  = $sessionLimitSetting['config']['unique_only']; // false
435 435
 
436 436
             $this->kernel->limitSession($onlineUsers, $alivePeriod, $isUniqueIp);
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 
454 454
             $lastResetTime = $cronjobSetting['config']['last_update'];
455 455
 
456
-            if (!empty($lastResetTime) ) {
456
+            if (!empty($lastResetTime)) {
457 457
                 $lastResetTime = strtotime($lastResetTime);
458 458
             } else {
459 459
                 // @codeCoverageIgnoreStart
@@ -535,8 +535,8 @@  discard block
 block discarded – undo
535 535
         $dialogInfo = $this->getOption('dialog_info_disclosure');
536 536
 
537 537
         $this->kernel->setProperty('display_online_info', $dialogInfo['online_user_amount']);
538
-        $this->kernel->setProperty('display_user_info',   $dialogInfo['user_inforamtion']);
539
-        $this->kernel->setProperty('display_http_code',   $dialogInfo['http_status_code']);
538
+        $this->kernel->setProperty('display_user_info', $dialogInfo['user_inforamtion']);
539
+        $this->kernel->setProperty('display_http_code', $dialogInfo['http_status_code']);
540 540
         $this->kernel->setProperty('display_reason_code', $dialogInfo['reason_code']);
541 541
         $this->kernel->setProperty('display_reason_text', $dialogInfo['reason_text']);
542 542
     }
Please login to merge, or discard this patch.