Passed
Push — 2.x ( 96150f...1cf170 )
by Terry
02:22
created
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.
src/Firewall/Firewall/Messenger/ItemNativePhpMail.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
      */
31 31
     public static function get(array $setting): MessengerInterface
32 32
     {
33
-        $sender     = $setting['config']['sender']     ?? '';
33
+        $sender     = $setting['config']['sender'] ?? '';
34 34
         $recipients = $setting['config']['recipients'] ?? [];
35 35
 
36 36
         $instance = new Mail();
Please login to merge, or discard this patch.
src/Firewall/Panel/Ajax.php 1 patch
Spacing   +3 added lines, -3 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
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         // Call testing method if exists.
132 132
         $status = $this->{$method}($getParams, $message);
133 133
 
134
-        if ( $status) {
134
+        if ($status) {
135 135
             $data['status'] = 'success';
136 136
             $postParams[$postKey] = 'on';
137 137
             $this->saveConfig();
Please login to merge, or discard this patch.
src/Firewall/Firewall/Messenger/ItemSmtp.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,12 +40,12 @@
 block discarded – undo
40 40
      */
41 41
     public static function get(array $setting): MessengerInterface
42 42
     {
43
-        $sender     = $setting['config']['sender']     ?? '';
43
+        $sender     = $setting['config']['sender'] ?? '';
44 44
         $recipients = $setting['config']['recipients'] ?? [];
45
-        $host       = $setting['config']['host']       ?? '';
46
-        $user       = $setting['config']['user']       ?? '';
47
-        $pass       = $setting['config']['pass']       ?? '';
48
-        $port       = $setting['config']['port']       ?? '';
45
+        $host       = $setting['config']['host'] ?? '';
46
+        $user       = $setting['config']['user'] ?? '';
47
+        $pass       = $setting['config']['pass'] ?? '';
48
+        $port       = $setting['config']['port'] ?? '';
49 49
 
50 50
         $instance = new Smtp($user, $pass, $host, (int) $port);
51 51
         $instance->setSubject(__('core', 'messenger_text_mail_subject'));
Please login to merge, or discard this patch.
src/Firewall/Firewall/Messenger/ItemSendgrid.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@
 block discarded – undo
40 40
      */
41 41
     public static function get(array $setting): MessengerInterface
42 42
     {
43
-        $apiKey     = $setting['config']['api_key']    ?? '';
44
-        $sender     = $setting['config']['sender']     ?? '';
43
+        $apiKey     = $setting['config']['api_key'] ?? '';
44
+        $sender     = $setting['config']['sender'] ?? '';
45 45
         $recipients = $setting['config']['recipients'] ?? [];
46 46
 
47 47
         $instance = new Sendgrid($apiKey);
Please login to merge, or discard this patch.
src/Firewall/Driver/RedisDriver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -274,8 +274,8 @@
 block discarded – undo
274 274
     {
275 275
         $table = [
276 276
             'filter'  => $this->tableFilterLogs . ':' . $ip,
277
-            'session' => $this->tableSessions   . ':' . $ip,
278
-            'rule'    => $this->tableRuleList   . ':' . $ip,
277
+            'session' => $this->tableSessions . ':' . $ip,
278
+            'rule'    => $this->tableRuleList . ':' . $ip,
279 279
         ];
280 280
         
281 281
         return $table[$type] ?? '';
Please login to merge, or discard this patch.
src/Firewall/Driver/FileDriverTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,8 +100,8 @@
 block discarded – undo
100 100
         $path = [];
101 101
 
102 102
         $path['filter']  = $this->directory . '/' . $this->tableFilterLogs . '/' . $ip . '.' . $this->extension;
103
-        $path['session'] = $this->directory . '/' . $this->tableSessions   . '/' . $ip . '.' . $this->extension;
104
-        $path['rule']    = $this->directory . '/' . $this->tableRuleList   . '/' . $ip . '.' . $this->extension;
103
+        $path['session'] = $this->directory . '/' . $this->tableSessions . '/' . $ip . '.' . $this->extension;
104
+        $path['rule']    = $this->directory . '/' . $this->tableRuleList . '/' . $ip . '.' . $this->extension;
105 105
 
106 106
         return $path[$type] ?? '';
107 107
     }
Please login to merge, or discard this patch.
src/Firewall/FirewallTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -243,7 +243,7 @@
 block discarded – undo
243 243
     {
244 244
         $driverType = (string) $this->getOption('driver_type');
245 245
 
246
-        return $this->directory . '/' . $this->channel .  '_' . $driverType . '_' . $this->checkpoint;
246
+        return $this->directory . '/' . $this->channel . '_' . $driverType . '_' . $this->checkpoint;
247 247
     }
248 248
 
249 249
     /**
Please login to merge, or discard this patch.