Passed
Push — 2.x ( d24405...546b7d )
by Terry
05:52 queued 11s
created
src/Firewall/Component/Rdns.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     public function isDenied(): bool
46 46
     {
47 47
         if (!empty($this->deniedList)) {
48
-            if (preg_match('/(' . implode('|', $this->deniedList). ')/i', $this->rdns)) {
48
+            if (preg_match('/(' . implode('|', $this->deniedList) . ')/i', $this->rdns)) {
49 49
                 return true;
50 50
             }
51 51
         }
Please login to merge, or discard this patch.
src/Firewall/Component/UserAgent.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -49,19 +49,19 @@  discard block
 block discarded – undo
49 49
         $this->deniedList = [
50 50
 
51 51
             // Backlink crawlers
52
-            'Ahrefs',     // http://ahrefs.com/robot/
53
-            'roger',      // rogerbot (SEOMOZ)
54
-            'moz.com',    // SEOMOZ crawlers
55
-            'MJ12bot',    // Majestic crawlers
56
-            'findlinks',  // http://wortschatz.uni-leipzig.de/findlinks
57
-            'Semrush',    // http://www.semrush.com/bot.html
52
+            'Ahrefs', // http://ahrefs.com/robot/
53
+            'roger', // rogerbot (SEOMOZ)
54
+            'moz.com', // SEOMOZ crawlers
55
+            'MJ12bot', // Majestic crawlers
56
+            'findlinks', // http://wortschatz.uni-leipzig.de/findlinks
57
+            'Semrush', // http://www.semrush.com/bot.html
58 58
     
59 59
             // Web information crawlers
60
-            'domain',     // Domain name information crawlers.
61
-            'copyright',  // Copyright information crawlers.
60
+            'domain', // Domain name information crawlers.
61
+            'copyright', // Copyright information crawlers.
62 62
     
63 63
             // Others
64
-            'archive',    // Wayback machine
64
+            'archive', // Wayback machine
65 65
         ];
66 66
     }
67 67
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function isDenied(): bool
72 72
     {
73 73
         if (!empty($this->deniedList)) {
74
-            if (preg_match('/(' . implode('|', $this->deniedList). ')/i', $this->userAgent)) {
74
+            if (preg_match('/(' . implode('|', $this->deniedList) . ')/i', $this->userAgent)) {
75 75
                 return true;
76 76
             }
77 77
         }
Please login to merge, or discard this patch.
src/Firewall/Panel/Home.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -236,11 +236,11 @@
 block discarded – undo
236 236
     private function overviewTemplateVarsOfComponents(array $data = []): array
237 237
     {
238 238
         $data['components'] = [
239
-            'Ip'         => (!empty($this->kernel->component['Ip']))         ? true : false,
239
+            'Ip'         => (!empty($this->kernel->component['Ip'])) ? true : false,
240 240
             'TrustedBot' => (!empty($this->kernel->component['TrustedBot'])) ? true : false,
241
-            'Header'     => (!empty($this->kernel->component['Header']))     ? true : false,
242
-            'Rdns'       => (!empty($this->kernel->component['Rdns']))       ? true : false,
243
-            'UserAgent'  => (!empty($this->kernel->component['UserAgent']))  ? true : false,
241
+            'Header'     => (!empty($this->kernel->component['Header'])) ? true : false,
242
+            'Rdns'       => (!empty($this->kernel->component['Rdns'])) ? true : false,
243
+            'UserAgent'  => (!empty($this->kernel->component['UserAgent'])) ? true : false,
244 244
         ];
245 245
 
246 246
         return $data;
Please login to merge, or discard this patch.
src/Firewall/Firewall/Messenger/ItemSlack.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     public static function get(array $setting): MessengerInterface
31 31
     {
32 32
         $botToken = $setting['config']['bot_token'] ?? '';
33
-        $channel  = $setting['config']['channel']   ?? '';
33
+        $channel  = $setting['config']['channel'] ?? '';
34 34
 
35 35
         return new Slack($botToken, $channel);
36 36
     }
Please login to merge, or discard this patch.
src/Firewall/Firewall/Messenger/ItemMailgun.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@
 block discarded – undo
30 30
      */
31 31
     public static function get(array $setting): MessengerInterface
32 32
     {
33
-        $apiKey     = $setting['config']['api_key']     ?? '';
33
+        $apiKey     = $setting['config']['api_key'] ?? '';
34 34
         $domain     = $setting['config']['domain_name'] ?? '';
35
-        $sender     = $setting['config']['sender']      ?? '';
36
-        $recipients = $setting['config']['recipients']  ?? [];
35
+        $sender     = $setting['config']['sender'] ?? '';
36
+        $recipients = $setting['config']['recipients'] ?? [];
37 37
 
38 38
         $instance = new Mailgun($apiKey, $domain);
39 39
         $instance->setSubject(__('core', 'messenger_text_mail_subject'));
Please login to merge, or discard this patch.
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/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.