Passed
Push — 2.x ( 008340...958536 )
by Terry
02:17
created
src/Firewall/Firewall/Messenger/ItemRocketChat.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@
 block discarded – undo
29 29
      */
30 30
     public static function get(array $setting): MessengerInterface
31 31
     {
32
-        $serverUrl   = $setting['config']['server_url']   ?? '';
33
-        $userId      = $setting['config']['user_id']      ?? '';
32
+        $serverUrl   = $setting['config']['server_url'] ?? '';
33
+        $userId      = $setting['config']['user_id'] ?? '';
34 34
         $accessToken = $setting['config']['access_token'] ?? '';
35
-        $channel     = $setting['config']['channel']      ?? '';
35
+        $channel     = $setting['config']['channel'] ?? '';
36 36
 
37 37
         return new RocketChat($accessToken, $userId, $serverUrl, $channel);
38 38
     }
Please login to merge, or discard this patch.
src/Firewall/Firewall/Driver/ItemMysqlDriver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
             // Create a PDO instance.
38 38
             $pdoInstance = new PDO(
39 39
                 'mysql:host=' 
40
-                    . $setting['host']   . ';dbname=' 
40
+                    . $setting['host'] . ';dbname=' 
41 41
                     . $setting['dbname'] . ';charset=' 
42 42
                     . $setting['charset']
43 43
                 , (string) $setting['user']
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
         // @codeCoverageIgnoreStart
51 51
 
52
-        } catch(PDOException $e) {
52
+        } catch (PDOException $e) {
53 53
             echo $e->getMessage();
54 54
         }
55 55
 
Please login to merge, or discard this patch.
src/Firewall/Firewall.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     {
437 437
         $setting = $this->getOption('failed_attempts_in_a_row', 'events');
438 438
 
439
-        $enableDataCircle     = $setting['data_circle']['enable']     ?: false;
439
+        $enableDataCircle     = $setting['data_circle']['enable'] ?: false;
440 440
         $enableSystemFirewall = $setting['system_firewall']['enable'] ?: false;
441 441
 
442 442
         $this->kernel->setProperty('deny_attempt_enable', [
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
         $recordAttempt = $this->getOption('record_attempt');
454 454
 
455 455
         $detectionPeriod = $recordAttempt['detection_period'] ?? 5;
456
-        $timeToReset     = $recordAttempt['time_to_reset']    ?? 1800;
456
+        $timeToReset     = $recordAttempt['time_to_reset'] ?? 1800;
457 457
 
458 458
         $this->kernel->setProperty('record_attempt_detection_period', $detectionPeriod);
459 459
         $this->kernel->setProperty('reset_attempt_counter', $timeToReset);
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
     protected function setIptablesWatchingFolder(): void
468 468
     {
469 469
         $iptablesSetting = $this->getOption('config', 'iptables');
470
-        $this->kernel->setProperty('iptables_watching_folder',  $iptablesSetting['watching_folder']);
470
+        $this->kernel->setProperty('iptables_watching_folder', $iptablesSetting['watching_folder']);
471 471
     }
472 472
 
473 473
     /**
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
 
482 482
         if ($sessionLimitSetting['enable']) {
483 483
 
484
-            $onlineUsers = $sessionLimitSetting['config']['count']  ?? 100;
484
+            $onlineUsers = $sessionLimitSetting['config']['count'] ?? 100;
485 485
             $alivePeriod = $sessionLimitSetting['config']['period'] ?? 300;
486 486
 
487 487
             $this->kernel->limitSession($onlineUsers, $alivePeriod);
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 
509 509
             $lastResetTime = $cronjobSetting['config']['last_update'];
510 510
 
511
-            if (!empty($lastResetTime) ) {
511
+            if (!empty($lastResetTime)) {
512 512
                 $lastResetTime = strtotime($lastResetTime);
513 513
             } else {
514 514
                 // @codeCoverageIgnoreStart
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
         if (is_array($ipList)) {
576 576
             foreach ($ipList as $ip) {
577 577
 
578
-                if (0 === strpos($this->kernel->getCurrentUrl(), $ip['url']) ) {
578
+                if (0 === strpos($this->kernel->getCurrentUrl(), $ip['url'])) {
579 579
     
580 580
                     if ('allow' === $ip['rule']) {
581 581
                         $allowedList[] = $ip['ip'];
Please login to merge, or discard this patch.