Test Failed
Push — 2.x ( 445986...358314 )
by Terry
10:40
created
src/Firewall/Log/ActionLogParser.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -347,18 +347,18 @@  discard block
 block discarded – undo
347 347
 
348 348
         $results['captcha_chart_string']       = ''; // string
349 349
         $results['pageview_chart_string']      = ''; // string
350
-        $results['captcha_success_count']      = 0;  // integer
351
-        $results['captcha_failure_count']      = 0;  // integer
352
-        $results['captcha_count']              = 0;  // integer
353
-        $results['pageview_count']             = 0;  // integer
354
-        $results['captcha_percentageage']      = 0;  // integer
355
-        $results['captcha_failure_percentage'] = 0;  // integer
356
-        $results['captcha_success_percentage'] = 0;  // integer
357
-        $results['action_ban_count']           = 0;  // integer
358
-        $results['action_temp_ban_count']      = 0;  // integer
359
-        $results['action_unban_count']         = 0;  // integer
360
-        $results['blacklist_count']            = 0;  // integer
361
-        $results['session_limit_count']        = 0;  // integer
350
+        $results['captcha_success_count']      = 0; // integer
351
+        $results['captcha_failure_count']      = 0; // integer
352
+        $results['captcha_count']              = 0; // integer
353
+        $results['pageview_count']             = 0; // integer
354
+        $results['captcha_percentageage']      = 0; // integer
355
+        $results['captcha_failure_percentage'] = 0; // integer
356
+        $results['captcha_success_percentage'] = 0; // integer
357
+        $results['action_ban_count']           = 0; // integer
358
+        $results['action_temp_ban_count']      = 0; // integer
359
+        $results['action_unban_count']         = 0; // integer
360
+        $results['blacklist_count']            = 0; // integer
361
+        $results['session_limit_count']        = 0; // integer
362 362
 
363 363
         $ipdData = $this->getIpData();
364 364
 
@@ -407,18 +407,18 @@  discard block
 block discarded – undo
407 407
         $results['label_chart_string']         = ''; // string
408 408
         $results['captcha_chart_string']       = ''; // string
409 409
         $results['pageview_chart_string']      = ''; // string
410
-        $results['captcha_success_count']      = 0;  // integer
411
-        $results['captcha_failure_count']      = 0;  // integer
412
-        $results['captcha_count']              = 0;  // integer
413
-        $results['pageview_count']             = 0;  // integer
414
-        $results['captcha_percentageage']      = 0;  // integer
415
-        $results['captcha_failure_percentage'] = 0;  // integer
416
-        $results['captcha_success_percentage'] = 0;  // integer
417
-        $results['action_ban_count']           = 0;  // integer
418
-        $results['action_temp_ban_count']      = 0;  // integer
419
-        $results['action_unban_count']         = 0;  // integer
420
-        $results['blacklist_count']            = 0;  // integer
421
-        $results['session_limit_count']        = 0;  // integer
410
+        $results['captcha_success_count']      = 0; // integer
411
+        $results['captcha_failure_count']      = 0; // integer
412
+        $results['captcha_count']              = 0; // integer
413
+        $results['pageview_count']             = 0; // integer
414
+        $results['captcha_percentageage']      = 0; // integer
415
+        $results['captcha_failure_percentage'] = 0; // integer
416
+        $results['captcha_success_percentage'] = 0; // integer
417
+        $results['action_ban_count']           = 0; // integer
418
+        $results['action_temp_ban_count']      = 0; // integer
419
+        $results['action_unban_count']         = 0; // integer
420
+        $results['blacklist_count']            = 0; // integer
421
+        $results['session_limit_count']        = 0; // integer
422 422
 
423 423
         if (!empty($periodData)) {
424 424
             $chartCaptcha = [];
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
         $ip = $log['ip'];
484 484
         $sessionId = $log['session_id'];
485 485
 
486
-        $this->ipDetail[$t][$ip]['session_id'][$sessionId ] = 1;
486
+        $this->ipDetail[$t][$ip]['session_id'][$sessionId] = 1;
487 487
 
488 488
         if ($logActionCode === self::LOG_TEMPORARILY_BAN) {
489 489
             $this->periodDetail[$t][$k]['action_temp_ban_count']++;
Please login to merge, or discard this patch.
src/Firewall/Firewall/XssProtectionTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         if ($enable['post']) {
88 88
             $this->kernel->setClosure(
89 89
                 'xss_post',
90
-                function () use ($xss) {
90
+                function() use ($xss) {
91 91
                     if (!empty($_POST)) {
92 92
                         foreach (array_keys($_POST) as $k) {
93 93
                             $_POST[$k] = $xss->clean($_POST[$k]);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         if ($enable['get']) {
112 112
             $this->kernel->setClosure(
113 113
                 'xss_get',
114
-                function () use ($xss) {
114
+                function() use ($xss) {
115 115
                     if (!empty($_GET)) {
116 116
                         foreach (array_keys($_GET) as $k) {
117 117
                             $_GET[$k] = $xss->clean($_GET[$k]);
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         if ($enable['cookie']) {
136 136
             $this->kernel->setClosure(
137 137
                 'xss_cookie',
138
-                function () use ($xss) {
138
+                function() use ($xss) {
139 139
                     if (!empty($_COOKIE)) {
140 140
                         foreach (array_keys($_COOKIE) as $k) {
141 141
                             $_COOKIE[$k] = $xss->clean($_COOKIE[$k]);
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         if (!empty($protectedList)) {
160 160
             $this->kernel->setClosure(
161 161
                 'xss_protection',
162
-                function () use ($xss, $protectedList) {
162
+                function() use ($xss, $protectedList) {
163 163
                     foreach ($protectedList as $v) {
164 164
                         $k = $v['variable'] ?? 'undefined';
165 165
         
Please login to merge, or discard this patch.
src/Firewall/Firewall/Driver/DriverFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         $str = implode(
62 62
             '',
63 63
             array_map(
64
-                function ($word) {
64
+                function($word) {
65 65
                     return ucwords($word);
66 66
                 },
67 67
                 $str
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
@@ -44,8 +44,8 @@
 block discarded – undo
44 44
 
45 45
         try {
46 46
             $host = 'mysql' .
47
-                ':host='    . $setting['host'] .
48
-                ';dbname='  . $setting['dbname'] .
47
+                ':host=' . $setting['host'] .
48
+                ';dbname=' . $setting['dbname'] .
49 49
                 ';charset=' . $setting['charset'];
50 50
 
51 51
             $user = (string) $setting['user'];
Please login to merge, or discard this patch.
src/Firewall/Firewall/Messenger/MessengerFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
         $str = implode(
79 79
             '',
80 80
             array_map(
81
-                function ($word) {
81
+                function($word) {
82 82
                     return ucwords($word);
83 83
                 },
84 84
                 $str
Please login to merge, or discard this patch.
src/Firewall/Firewall/Captcha/CaptchaFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         $str = implode(
78 78
             '',
79 79
             array_map(
80
-                function ($word) {
80
+                function($word) {
81 81
                     return ucwords($word);
82 82
                 },
83 83
                 $str
Please login to merge, or discard this patch.
src/Firewall/Firewall.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@
 block discarded – undo
137 137
 
138 138
         Event::AddListener(
139 139
             'dialog_output',
140
-            function () {
140
+            function() {
141 141
                 Container::set('shieldon_end', [
142 142
                     'time'   => microtime(),
143 143
                     'memory' => memory_get_usage(),
Please login to merge, or discard this patch.
src/Firewall/Kernel.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 
335 335
         Event::AddListener(
336 336
             'set_session_driver',
337
-            function ($args) {
337
+            function($args) {
338 338
                 $session = get_session_instance();
339 339
                 $session->init(
340 340
                     $args['driver'],
@@ -594,11 +594,11 @@  discard block
 block discarded – undo
594 594
         $this->initComponents();
595 595
 
596 596
         $processMethods = [
597
-            'isRuleExist',   // Stage 1 - Looking for rule table.
598
-            'isTrustedBot',  // Stage 2 - Detect popular search engine.
599
-            'isFakeRobot',   // Stage 3 - Reject fake search engine crawlers.
597
+            'isRuleExist', // Stage 1 - Looking for rule table.
598
+            'isTrustedBot', // Stage 2 - Detect popular search engine.
599
+            'isFakeRobot', // Stage 3 - Reject fake search engine crawlers.
600 600
             'isIpComponent', // Stage 4 - IP manager.
601
-            'isComponents',  // Stage 5 - Check other components.
601
+            'isComponents', // Stage 5 - Check other components.
602 602
         ];
603 603
 
604 604
         foreach ($processMethods as $method) {
Please login to merge, or discard this patch.
src/Firewall/Panel/BaseController.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -476,12 +476,10 @@
 block discarded – undo
476 476
         $echo = [];
477 477
 
478 478
         $echo['css'] = $this->getConfig('messengers.' . $moduleName . '.confirm_test') ?
479
-            'success' :
480
-            '';
479
+            'success' : '';
481 480
         
482 481
         $echo['icon'] = $this->getConfig('messengers.' . $moduleName . '.confirm_test') ?
483
-            '<i class="fas fa-check"></i>' :
484
-            '<i class="fas fa-exclamation"></i>';
482
+            '<i class="fas fa-check"></i>' : '<i class="fas fa-exclamation"></i>';
485 483
 
486 484
         echo $echo[$echoType];
487 485
     }
Please login to merge, or discard this patch.