Passed
Push — 2.x ( d24405...546b7d )
by Terry
05:52 queued 11s
created
src/Firewall/Firewall/SetupTrait.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
             if (empty($ip))
317 317
                 continue;
318 318
 
319
-            if (0 === strpos($this->kernel->getCurrentUrl(), empty($ip['url']) ? '/' : $ip['url']) ) {
319
+            if (0 === strpos($this->kernel->getCurrentUrl(), empty($ip['url']) ? '/' : $ip['url'])) {
320 320
 
321 321
                 if ('allow' === $ip['rule']) {
322 322
                     $allowedList[] = $ip['ip'];
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
         $this->kernel->setProperty(
379 379
             'deny_attempt_enable',
380 380
             [
381
-                'data_circle'     => $setting['data_circle']['enable'],     // false   
381
+                'data_circle'     => $setting['data_circle']['enable'], // false   
382 382
                 'system_firewall' => $setting['system_firewall']['enable'], // false   
383 383
             ]
384 384
         );
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         $this->kernel->setProperty(
387 387
             'deny_attempt_buffer',
388 388
             [
389
-                'data_circle'     => $setting['data_circle']['buffer'],     // 10
389
+                'data_circle'     => $setting['data_circle']['buffer'], // 10
390 390
                 'system_firewall' => $setting['system_firewall']['buffer'], // 10
391 391
             ]
392 392
         );
@@ -431,8 +431,8 @@  discard block
 block discarded – undo
431 431
 
432 432
         if ($sessionLimitSetting['enable']) {
433 433
 
434
-            $onlineUsers = $sessionLimitSetting['config']['count'];       // default: 100
435
-            $alivePeriod = $sessionLimitSetting['config']['period'];      // default: 300
434
+            $onlineUsers = $sessionLimitSetting['config']['count']; // default: 100
435
+            $alivePeriod = $sessionLimitSetting['config']['period']; // default: 300
436 436
             $isUniqueIp  = $sessionLimitSetting['config']['unique_only']; // false
437 437
 
438 438
             $this->kernel->limitSession($onlineUsers, $alivePeriod, $isUniqueIp);
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 
456 456
             $lastResetTime = $cronjobSetting['config']['last_update'];
457 457
 
458
-            if (!empty($lastResetTime) ) {
458
+            if (!empty($lastResetTime)) {
459 459
                 $lastResetTime = strtotime($lastResetTime);
460 460
             } else {
461 461
                 // @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.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -313,8 +313,9 @@
 block discarded – undo
313 313
         $deniedList = [];
314 314
 
315 315
         foreach ($ipList as $ip) {
316
-            if (empty($ip))
317
-                continue;
316
+            if (empty($ip)) {
317
+                            continue;
318
+            }
318 319
 
319 320
             if (0 === strpos($this->kernel->getCurrentUrl(), empty($ip['url']) ? '/' : $ip['url']) ) {
320 321
 
Please login to merge, or discard this patch.