Passed
Push — 2.x ( 4516a4...0d32ef )
by Terry
01:53
created
src/Firewall/Driver/SqlDriverProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 
332 332
             // @codeCoverageIgnoreStart
333 333
         
334
-        } catch(Exception $e) {
334
+        } catch (Exception $e) {
335 335
             return false;
336 336
         }
337 337
 
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 
391 391
             // @codeCoverageIgnoreStart
392 392
 
393
-        } catch(Exception $e) {
393
+        } catch (Exception $e) {
394 394
             return false;
395 395
         }
396 396
 
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
 
444 444
             // @codeCoverageIgnoreStart
445 445
 
446
-        } catch(Exception $e) {
446
+        } catch (Exception $e) {
447 447
             return false;
448 448
         }
449 449
 
Please login to merge, or discard this patch.
src/Firewall/Firewall/MainTrait.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
 
114 114
         $this->kernel->setProperty('time_unit_quota', $frequencyQuota);
115 115
 
116
-        $this->kernel->setProperty('cookie_name', $settings['cookie']['config']['cookie_name']);      // ssjd
117
-        $this->kernel->setProperty('cookie_domain', $settings['cookie']['config']['cookie_domain']);  // ''
118
-        $this->kernel->setProperty('cookie_value', $settings['cookie']['config']['cookie_value']);    // 1
116
+        $this->kernel->setProperty('cookie_name', $settings['cookie']['config']['cookie_name']); // ssjd
117
+        $this->kernel->setProperty('cookie_domain', $settings['cookie']['config']['cookie_domain']); // ''
118
+        $this->kernel->setProperty('cookie_value', $settings['cookie']['config']['cookie_value']); // 1
119 119
 
120 120
         $this->kernel->setProperty('interval_check_referer', $settings['referer']['config']['time_buffer']);
121 121
         $this->kernel->setProperty('interval_check_session', $settings['referer']['config']['time_buffer']);
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 
225 225
         foreach ($ipList as $ip) {
226 226
 
227
-            if (0 === strpos($this->kernel->getCurrentUrl(), $ip['url']) ) {
227
+            if (0 === strpos($this->kernel->getCurrentUrl(), $ip['url'])) {
228 228
 
229 229
                 if ('allow' === $ip['rule']) {
230 230
                     $allowedList[] = $ip['ip'];
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
         $this->kernel->setProperty(
295 295
             'deny_attempt_enable',
296 296
             [
297
-                'data_circle'     => $setting['data_circle']['enable'],     // false   
297
+                'data_circle'     => $setting['data_circle']['enable'], // false   
298 298
                 'system_firewall' => $setting['system_firewall']['enable'], // false   
299 299
             ]
300 300
         );
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
         $this->kernel->setProperty(
303 303
             'deny_attempt_buffer',
304 304
             [
305
-                'data_circle'     => $setting['data_circle']['buffer'],     // 10
305
+                'data_circle'     => $setting['data_circle']['buffer'], // 10
306 306
                 'system_firewall' => $setting['system_firewall']['buffer'], // 10
307 307
             ]
308 308
         );
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 
348 348
         if ($sessionLimitSetting['enable']) {
349 349
 
350
-            $onlineUsers = $sessionLimitSetting['config']['count']  ?? 100;
350
+            $onlineUsers = $sessionLimitSetting['config']['count'] ?? 100;
351 351
             $alivePeriod = $sessionLimitSetting['config']['period'] ?? 300;
352 352
 
353 353
             $this->kernel->limitSession($onlineUsers, $alivePeriod);
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
 
371 371
             $lastResetTime = $cronjobSetting['config']['last_update'];
372 372
 
373
-            if (!empty($lastResetTime) ) {
373
+            if (!empty($lastResetTime)) {
374 374
                 $lastResetTime = strtotime($lastResetTime);
375 375
             } else {
376 376
                 // @codeCoverageIgnoreStart
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
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
         $str = implode(
80 80
             '',
81 81
             array_map(
82
-                function ($word) {
82
+                function($word) {
83 83
                     return ucwords($word); 
84 84
                 },
85 85
                 $str
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
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
         $str = implode(
81 81
             '',
82 82
             array_map(
83
-                function ($word) {
83
+                function($word) {
84 84
                     return ucwords($word); 
85 85
                 },
86 86
                 $str
Please login to merge, or discard this patch.
src/Firewall/Firewall/Driver/ItemMysqlDriver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
         try {
46 46
   
47 47
             $host = 'mysql' . 
48
-                ':host='    . $setting['host'] .
49
-                ';dbname='  . $setting['dbname'] .
48
+                ':host=' . $setting['host'] .
49
+                ';dbname=' . $setting['dbname'] .
50 50
                 ';charset=' . $setting['charset'];
51 51
 
52 52
             $user = (string) $setting['user'];
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
             // @codeCoverageIgnoreStart
62 62
 
63
-        } catch(PDOException $e) {
63
+        } catch (PDOException $e) {
64 64
             echo $e->getMessage();
65 65
         }
66 66
 
Please login to merge, or discard this patch.
src/Firewall/Firewall/Driver/ItemRedisDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
 
71 71
             // @codeCoverageIgnoreStart
72 72
 
73
-        } catch(RedisException $e) {
73
+        } catch (RedisException $e) {
74 74
             echo $e->getMessage();
75 75
         }
76 76
 
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
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         $str = implode(
58 58
             '',
59 59
             array_map(
60
-                function ($word) {
60
+                function($word) {
61 61
                     return ucwords($word); 
62 62
                 },
63 63
                 $str
Please login to merge, or discard this patch.
src/Firewall/Firewall/Driver/ItemSqliteDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 
55 55
             // @codeCoverageIgnoreStart
56 56
 
57
-        } catch(PDOException $e) {
57
+        } catch (PDOException $e) {
58 58
             echo $e->getMessage();
59 59
         }
60 60
 
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
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
             $this->kernel->setClosure(
81 81
                 'xss_post',
82
-                function () use ($xss) {
82
+                function() use ($xss) {
83 83
                     if (!empty($_POST)) {
84 84
                         foreach (array_keys($_POST) as $k) {
85 85
                             $_POST[$k] = $xss->clean($_POST[$k]);
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
             $this->kernel->setClosure(
106 106
                 'xss_get',
107
-                function () use ($xss) {
107
+                function() use ($xss) {
108 108
                     if (!empty($_GET)) {
109 109
                         foreach (array_keys($_GET) as $k) {
110 110
                             $_GET[$k] = $xss->clean($_GET[$k]);
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
             $this->kernel->setClosure(
131 131
                 'xss_cookie',
132
-                function () use ($xss) {
132
+                function() use ($xss) {
133 133
                     if (!empty($_COOKIE)) {
134 134
                         foreach (array_keys($_COOKIE) as $k) {
135 135
                             $_COOKIE[$k] = $xss->clean($_COOKIE[$k]);
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
             $this->kernel->setClosure(
156 156
                 'xss_protection', 
157
-                function () use ($xss, $protectedList) {
157
+                function() use ($xss, $protectedList) {
158 158
                     foreach ($protectedList as $v) {
159 159
                         $k = $v['variable'] ?? 'undefined';
160 160
         
Please login to merge, or discard this patch.