Passed
Push — 2.x ( 4516a4...0d32ef )
by Terry
01:53
created
src/Firewall/Captcha/ImageCaptcha.php 1 patch
Spacing   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             'colors'       => [
111 111
                 'background' => [255, 255, 255],
112 112
                 'border'     => [153, 200, 255],
113
-                'text'       => [51,  153, 255],
113
+                'text'       => [51, 153, 255],
114 114
                 'grid'       => [153, 200, 255]
115 115
             ]
116 116
         ];
@@ -329,14 +329,12 @@  discard block
 block discarded – undo
329 329
     {
330 330
         // Determine angle and position.
331 331
         $angle = ($this->length >= 6) ?
332
-            mt_rand(-($this->length - 6), ($this->length - 6)) :
333
-            0;
332
+            mt_rand(-($this->length - 6), ($this->length - 6)) : 0;
334 333
 
335 334
         $xAxis = mt_rand(6, (360 / $this->length) - 16);
336 335
 
337 336
         $yAxis = ($angle >= 0) ?
338
-            mt_rand($imgHeight, $imgWidth) :
339
-            mt_rand(6, $imgHeight);
337
+            mt_rand($imgHeight, $imgWidth) : mt_rand(6, $imgHeight);
340 338
 
341 339
         // Create the spiral pattern.
342 340
         $theta   = 1;
Please login to merge, or discard this patch.
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.