Passed
Push — 2.x ( ad8aea...da19d0 )
by Terry
01:55
created
src/Firewall/Firewall/MainTrait.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
         $this->kernel->setProperty('time_unit_quota', $frequencyQuota);
105 105
 
106 106
         // if ($cookieSetting['enable']) {
107
-        $cookieName   = $settings['cookie']['config']['cookie_name']   ?? 'ssjd';
107
+        $cookieName   = $settings['cookie']['config']['cookie_name'] ?? 'ssjd';
108 108
         $cookieDomain = $settings['cookie']['config']['cookie_domain'] ?? '';
109
-        $cookieValue  = $settings['cookie']['config']['cookie_value']  ?? '1';
109
+        $cookieValue  = $settings['cookie']['config']['cookie_value'] ?? '1';
110 110
 
111 111
         $this->kernel->setProperty('cookie_name', $cookieName);
112 112
         $this->kernel->setProperty('cookie_domain', $cookieDomain);
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
         if (is_array($ipList)) {
228 228
             foreach ($ipList as $ip) {
229 229
 
230
-                if (0 === strpos($this->kernel->getCurrentUrl(), $ip['url']) ) {
230
+                if (0 === strpos($this->kernel->getCurrentUrl(), $ip['url'])) {
231 231
     
232 232
                     if ('allow' === $ip['rule']) {
233 233
                         $allowedList[] = $ip['ip'];
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
     {
297 297
         $setting = $this->getOption('failed_attempts_in_a_row', 'events');
298 298
 
299
-        $enableDataCircle     = $setting['data_circle']['enable']     ?: false;
299
+        $enableDataCircle     = $setting['data_circle']['enable'] ?: false;
300 300
         $enableSystemFirewall = $setting['system_firewall']['enable'] ?: false;
301 301
 
302 302
         $this->kernel->setProperty('deny_attempt_enable', [
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
         $recordAttempt = $this->getOption('record_attempt');
314 314
 
315 315
         $detectionPeriod = $recordAttempt['detection_period'] ?? 5;
316
-        $timeToReset     = $recordAttempt['time_to_reset']    ?? 1800;
316
+        $timeToReset     = $recordAttempt['time_to_reset'] ?? 1800;
317 317
 
318 318
         $this->kernel->setProperty('record_attempt_detection_period', $detectionPeriod);
319 319
         $this->kernel->setProperty('reset_attempt_counter', $timeToReset);
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
     protected function setIptablesBridgeDirectory(): void
328 328
     {
329 329
         $iptablesSetting = $this->getOption('config', 'iptables');
330
-        $this->kernel->setProperty('iptables_watching_folder',  $iptablesSetting['watching_folder']);
330
+        $this->kernel->setProperty('iptables_watching_folder', $iptablesSetting['watching_folder']);
331 331
     }
332 332
 
333 333
     /**
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 
342 342
         if ($sessionLimitSetting['enable']) {
343 343
 
344
-            $onlineUsers = $sessionLimitSetting['config']['count']  ?? 100;
344
+            $onlineUsers = $sessionLimitSetting['config']['count'] ?? 100;
345 345
             $alivePeriod = $sessionLimitSetting['config']['period'] ?? 300;
346 346
 
347 347
             $this->kernel->limitSession($onlineUsers, $alivePeriod);
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 
369 369
             $lastResetTime = $cronjobSetting['config']['last_update'];
370 370
 
371
-            if (!empty($lastResetTime) ) {
371
+            if (!empty($lastResetTime)) {
372 372
                 $lastResetTime = strtotime($lastResetTime);
373 373
             } else {
374 374
                 // @codeCoverageIgnoreStart
Please login to merge, or discard this patch.