Passed
Push — 2.x ( fbc7ae...5178d8 )
by Terry
02:24
created
templates/panel/table_sessions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             </div>
40 40
             <div class="board-field right">
41 41
                 <div class="heading"><?php _e('panel', 'table_heading_period', 'Period'); ?></div>
42
-                <div class="nums"><?php echo number_format($session_limit_period ); ?></div>
42
+                <div class="nums"><?php echo number_format($session_limit_period); ?></div>
43 43
                 <div class="note"><?php _e('panel', 'table_note_period', 'Keep-alive period. (minutes)'); ?></div>
44 44
             </div>
45 45
         </div>
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             </div>
50 50
             <div class="board-field right">
51 51
                 <div class="heading"><?php _e('panel', 'table_heading_online', 'Online'); ?></div>
52
-                <div class="nums"><?php echo number_format($online_count ); ?></div>
52
+                <div class="nums"><?php echo number_format($online_count); ?></div>
53 53
                 <div class="note"><?php _e('panel', 'table_note_online', 'Online session amount.'); ?></div>
54 54
             </div>
55 55
         </div>
@@ -89,14 +89,14 @@  discard block
 block discarded – undo
89 89
 
90 90
                         $remainsTime = $expires - (time() - $sessionInfo['time']);
91 91
 
92
-                        if ($remainsTime < 1 ) {
92
+                        if ($remainsTime < 1) {
93 93
                             $remainsTime = 0;
94 94
                         }
95 95
 
96
-                        if ($i < $session_limit_count ) {
96
+                        if ($i < $session_limit_count) {
97 97
                             $satusName = __('panel', 'table_text_allowable', 'Allowable');
98 98
 
99
-                            if ($remainsTime < 1 ) {
99
+                            if ($remainsTime < 1) {
100 100
                                 $satusName = __('panel', 'table_text_expired', 'Expired');
101 101
                             }
102 102
                         } else {
Please login to merge, or discard this patch.
templates/panel/table_filter_logs.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,20 +58,20 @@
 block discarded – undo
58 58
             </thead>
59 59
             <tbody>
60 60
                 <?php foreach ($ip_log_list as $ipInfo) : ?>
61
-                    <?php $logData = is_array($ipInfo['log_data']) ? $ipInfo['log_data'] : json_decode($ipInfo['log_data'], true ); ?>
61
+                    <?php $logData = is_array($ipInfo['log_data']) ? $ipInfo['log_data'] : json_decode($ipInfo['log_data'], true); ?>
62 62
                     <?php
63 63
 
64 64
                         $text_warning = '';
65 65
 
66
-                        if ($logData['pageviews_m'] > 6 || $logData['pageviews_h'] > 50 || $logData['pageviews_d'] > 100 ) {
66
+                        if ($logData['pageviews_m'] > 6 || $logData['pageviews_h'] > 50 || $logData['pageviews_d'] > 100) {
67 67
                             $text_warning = '<span class="so-text-warning"><i class="fas fa-exclamation-triangle"></i></span>';
68 68
                         }
69 69
 
70
-                        if ($logData['flag_js_cookie'] > 2 || $logData['flag_multi_session'] > 2 || $logData['flag_empty_referer'] > 2 ) {
70
+                        if ($logData['flag_js_cookie'] > 2 || $logData['flag_multi_session'] > 2 || $logData['flag_empty_referer'] > 2) {
71 71
                             $text_warning = '<span class="so-text-warning"><i class="fas fa-exclamation-triangle"></i></span>';
72 72
                         }
73 73
 
74
-                        if ($logData['flag_js_cookie'] > 3 || $logData['flag_multi_session'] > 3 || $logData['flag_empty_referer'] > 3 ) {
74
+                        if ($logData['flag_js_cookie'] > 3 || $logData['flag_multi_session'] > 3 || $logData['flag_empty_referer'] > 3) {
75 75
                             $text_warning = '<span class="so-text-danger"><i class="fas fa-exclamation-triangle"></i></span>';
76 76
                         }
77 77
                     ?>
Please login to merge, or discard this patch.
templates/frontend/captcha.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 							<p><input type="submit" value="<?php _e('core', 'stop_submit', 'Submit') ?>" /></p>
51 51
 						</form>
52 52
 					</div>
53
-					<?php if (! empty($dialoguserinfo)) : ?>
53
+					<?php if (!empty($dialoguserinfo)) : ?>
54 54
 						<div class="status-user-info">
55 55
 							<?php foreach ($dialoguserinfo as $key => $userinfo) : ?>
56 56
 								<div class="row">
Please login to merge, or discard this patch.
src/Firewall/Panel/BaseController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
             define('SHIELDON_VIEW', true);
166 166
         }
167 167
 
168
-        $viewFilePath =  __DIR__ . '/../../../templates/' . $page . '.php';
168
+        $viewFilePath = __DIR__ . '/../../../templates/' . $page . '.php';
169 169
     
170 170
         if (!empty($data)) {
171 171
             extract($data);
Please login to merge, or discard this patch.
src/Firewall/Panel/ConfigMethodsTrait.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -35,14 +35,14 @@
 block discarded – undo
35 35
  */
36 36
 trait ConfigMethodsTrait
37 37
 {
38
-     /**
39
-     * Parse the POST fields and set them into configuration data structure.
40
-     * Used for saveConfig method only.
41
-     *
42
-     * @param array $postParams
43
-     *
44
-     * @return void
45
-     */
38
+        /**
39
+         * Parse the POST fields and set them into configuration data structure.
40
+         * Used for saveConfig method only.
41
+         *
42
+         * @param array $postParams
43
+         *
44
+         * @return void
45
+         */
46 46
     protected function saveConfigPrepareSettings(array $postParams): void
47 47
     {
48 48
         foreach ($postParams as $postKey => $postData) {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                 } elseif (is_numeric($postData)) {
80 80
                     $this->setConfig(str_replace('__', '.', $postKey), (int) $postData);
81 81
 
82
-                } else  {
82
+                } else {
83 83
                     $this->setConfig(str_replace('__', '.', $postKey), $postData);
84 84
                 }
85 85
             }
@@ -162,10 +162,10 @@  discard block
 block discarded – undo
162 162
             // Create default log files.
163 163
             if (is_writable($iptablesWatchingFolder)) {
164 164
                 fopen($iptablesWatchingFolder . '/iptables_queue.log', 'w+');
165
-                fopen($iptablesWatchingFolder . '/ipv4_status.log',    'w+');
166
-                fopen($iptablesWatchingFolder . '/ipv6_status.log',    'w+');
167
-                fopen($iptablesWatchingFolder . '/ipv4_command.log',   'w+');
168
-                fopen($iptablesWatchingFolder . '/ipv6_command.log',   'w+');
165
+                fopen($iptablesWatchingFolder . '/ipv4_status.log', 'w+');
166
+                fopen($iptablesWatchingFolder . '/ipv6_status.log', 'w+');
167
+                fopen($iptablesWatchingFolder . '/ipv4_command.log', 'w+');
168
+                fopen($iptablesWatchingFolder . '/ipv6_command.log', 'w+');
169 169
 
170 170
                 return $result;
171 171
             }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
                     (string) $db['user'],
238 238
                     (string) $db['pass']
239 239
                 );
240
-            } catch(PDOException $e) {
240
+            } catch (PDOException $e) {
241 241
 
242 242
                 $result = false;
243 243
 
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
             try {
297 297
                 new PDO('sqlite:' . $sqliteFilePath);
298 298
 
299
-            } catch(PDOException $e) { 
299
+            } catch (PDOException $e) { 
300 300
                 $this->pushMessage('error', $e->getMessage());
301 301
                 $result = false;
302 302
             }
@@ -343,11 +343,11 @@  discard block
 block discarded – undo
343 343
                 $redis = new Redis();
344 344
                 $redis->connect(
345 345
                     (string) $this->getConfig('drivers.redis.host'), 
346
-                    (int)    $this->getConfig('drivers.redis.port')
346
+                    (int) $this->getConfig('drivers.redis.port')
347 347
                 );
348 348
                 unset($redis);
349 349
 
350
-            } catch(RedisException $e) {
350
+            } catch (RedisException $e) {
351 351
                 $this->pushMessage('error', $e->getMessage());
352 352
                 $result = false;
353 353
             }
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
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
         // @codeCoverageIgnoreStart
46 46
 
47
-        } catch(PDOException $e) {
47
+        } catch (PDOException $e) {
48 48
             echo $e->getMessage();
49 49
         }
50 50
 
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
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 
61 61
         // @codeCoverageIgnoreStart
62 62
 
63
-        } catch(RedisException $e) {
63
+        } catch (RedisException $e) {
64 64
             echo $e->getMessage();
65 65
         }
66 66
 
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.