Passed
Push — 2.x ( a76a74...57e8e7 )
by Terry
02:45
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 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -471,7 +471,7 @@
 block discarded – undo
471 471
             unset($setting);
472 472
         }
473 473
 
474
-       /*
474
+        /*
475 475
         |--------------------------------------------------------------------------
476 476
         | Set messenger events.
477 477
         |--------------------------------------------------------------------------
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
 
480 480
         $setting = $this->getOption('failed_attempts_in_a_row', 'events');
481 481
 
482
-        $notifyDataCircle     = $setting['data_circle']['messenger']     ?: false;
482
+        $notifyDataCircle     = $setting['data_circle']['messenger'] ?: false;
483 483
         $notifySystemFirewall = $setting['system_firewall']['messenger'] ?: false;
484 484
 
485 485
         $this->kernel->setProperty('deny_attempt_notify', [
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
     {
498 498
         $setting = $this->getOption('failed_attempts_in_a_row', 'events');
499 499
 
500
-        $enableDataCircle     = $setting['data_circle']['enable']     ?: false;
500
+        $enableDataCircle     = $setting['data_circle']['enable'] ?: false;
501 501
         $enableSystemFirewall = $setting['system_firewall']['enable'] ?: false;
502 502
 
503 503
         $this->kernel->setProperty('deny_attempt_enable', [
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
         $recordAttempt = $this->getOption('record_attempt');
515 515
 
516 516
         $detectionPeriod = $recordAttempt['detection_period'] ?? 5;
517
-        $timeToReset     = $recordAttempt['time_to_reset']    ?? 1800;
517
+        $timeToReset     = $recordAttempt['time_to_reset'] ?? 1800;
518 518
 
519 519
         $this->kernel->setProperty('record_attempt_detection_period', $detectionPeriod);
520 520
         $this->kernel->setProperty('reset_attempt_counter', $timeToReset);
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
     protected function setIptablesWatchingFolder(): void
529 529
     {
530 530
         $iptablesSetting = $this->getOption('config', 'iptables');
531
-        $this->kernel->setProperty('iptables_watching_folder',  $iptablesSetting['watching_folder']);
531
+        $this->kernel->setProperty('iptables_watching_folder', $iptablesSetting['watching_folder']);
532 532
     }
533 533
 
534 534
     /**
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
 
543 543
         if ($sessionLimitSetting['enable']) {
544 544
 
545
-            $onlineUsers = $sessionLimitSetting['config']['count']  ?? 100;
545
+            $onlineUsers = $sessionLimitSetting['config']['count'] ?? 100;
546 546
             $alivePeriod = $sessionLimitSetting['config']['period'] ?? 300;
547 547
 
548 548
             $this->kernel->limitSession($onlineUsers, $alivePeriod);
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
 
570 570
             $lastResetTime = $cronjobSetting['config']['last_update'];
571 571
 
572
-            if (!empty($lastResetTime) ) {
572
+            if (!empty($lastResetTime)) {
573 573
                 $lastResetTime = strtotime($lastResetTime);
574 574
             } else {
575 575
                 // @codeCoverageIgnoreStart
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
         if (is_array($ipList)) {
637 637
             foreach ($ipList as $ip) {
638 638
 
639
-                if (0 === strpos($this->kernel->getCurrentUrl(), $ip['url']) ) {
639
+                if (0 === strpos($this->kernel->getCurrentUrl(), $ip['url'])) {
640 640
     
641 641
                     if ('allow' === $ip['rule']) {
642 642
                         $allowedList[] = $ip['ip'];
Please login to merge, or discard this patch.