Passed
Push — 2.x ( 4a9b6a...b78933 )
by Terry
02:02
created
src/Firewall/Kernel.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -614,9 +614,9 @@
 block discarded – undo
614 614
         $this->initComponents();
615 615
 
616 616
         $processMethods = [
617
-            'isRuleExist',   // Stage 1 - Looking for rule table.
618
-            'isTrustedBot',  // Stage 2 - Detect popular search engine.
619
-            'isFakeRobot',   // Stage 3 - Reject fake search engine crawlers.
617
+            'isRuleExist', // Stage 1 - Looking for rule table.
618
+            'isTrustedBot', // Stage 2 - Detect popular search engine.
619
+            'isFakeRobot', // Stage 3 - Reject fake search engine crawlers.
620 620
             'isIpComponent', // Stage 4 - IP manager.
621 621
             'isComponents'   // Stage 5 - Check other components.
622 622
         ];
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -286,7 +286,7 @@
 block discarded – undo
286 286
      */
287 287
     protected $firewallType = 'self';
288 288
 
289
-   /**
289
+    /**
290 290
      * The reason code of a user to be allowed or denied.
291 291
      *
292 292
      * @var int|null
Please login to merge, or discard this patch.
src/Firewall/Panel/Ajax.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      *
58 58
      * @return bool
59 59
      */
60
-    public function __call($function , $args)
60
+    public function __call($function, $args)
61 61
     {
62 62
         $className = 'Shieldon\Firewall\Panel\Sandbox\\' . $function;
63 63
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $method = implode(
119 119
             '', 
120 120
             array_map(
121
-                function ($word) {
121
+                function($word) {
122 122
                     return ucwords($word); 
123 123
                 }, 
124 124
                 $method
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/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.
src/Firewall/Firewall/Messenger/MessengerFactory.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/Driver/DriverFactory.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/Captcha/ImageCaptcha.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 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
         ];
Please login to merge, or discard this patch.
src/Firewall/Panel/ConfigMethodsTrait.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
             // Create default log files.
178 178
             if (is_writable($iptablesWatchingFolder)) {
179 179
                 fopen($iptablesWatchingFolder . '/iptables_queue.log', 'w+');
180
-                fopen($iptablesWatchingFolder . '/ipv4_status.log',    'w+');
181
-                fopen($iptablesWatchingFolder . '/ipv6_status.log',    'w+');
182
-                fopen($iptablesWatchingFolder . '/ipv4_command.log',   'w+');
183
-                fopen($iptablesWatchingFolder . '/ipv6_command.log',   'w+');
180
+                fopen($iptablesWatchingFolder . '/ipv4_status.log', 'w+');
181
+                fopen($iptablesWatchingFolder . '/ipv6_status.log', 'w+');
182
+                fopen($iptablesWatchingFolder . '/ipv4_command.log', 'w+');
183
+                fopen($iptablesWatchingFolder . '/ipv6_command.log', 'w+');
184 184
 
185 185
                 return $result;
186 186
             }
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
                 $redis = new Redis();
364 364
                 $redis->connect(
365 365
                     (string) $this->getConfig('drivers.redis.host'), 
366
-                    (int)    $this->getConfig('drivers.redis.port')
366
+                    (int) $this->getConfig('drivers.redis.port')
367 367
                 );
368 368
                 unset($redis);
369 369
 
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
@@ -45,8 +45,8 @@
 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'];
Please login to merge, or discard this patch.