Passed
Push — 2.x ( 79255f...04295e )
by Terry
01:49
created
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.
src/Firewall/Log/ActionLogger.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -112,10 +112,10 @@
 block discarded – undo
112 112
 
113 113
         $data = [];
114 114
 
115
-        $data[0] = $record['ip']          ?? 'null';
116
-        $data[1] = $record['session_id']  ?? 'null';
115
+        $data[0] = $record['ip'] ?? 'null';
116
+        $data[1] = $record['session_id'] ?? 'null';
117 117
         $data[2] = $record['action_code'] ?? 'null';
118
-        $data[3] = $record['timesamp']    ?? 'null';
118
+        $data[3] = $record['timesamp'] ?? 'null';
119 119
 
120 120
         file_put_contents($this->filePath, implode(',', $data) . "\n", FILE_APPEND | LOCK_EX);
121 121
     }
Please login to merge, or discard this patch.
src/Firewall/Firewall/Captcha/ItemImage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
      */
40 40
     public static function get(array $setting): CaptchaInterface
41 41
     {
42
-        $type   = $setting['config']['type']   ?? 'alnum';
42
+        $type   = $setting['config']['type'] ?? 'alnum';
43 43
         $length = $setting['config']['length'] ?? 8;
44 44
 
45 45
         $imageCaptchaConfig = [];
Please login to merge, or discard this patch.
src/Firewall/Panel/BaseController.php 1 patch
Spacing   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             define('SHIELDON_VIEW', true);
165 165
         }
166 166
 
167
-        $viewFilePath =  __DIR__ . '/../../../templates/' . $page . '.php';
167
+        $viewFilePath = __DIR__ . '/../../../templates/' . $page . '.php';
168 168
     
169 169
         if (!empty($data)) {
170 170
             extract($data);
@@ -433,12 +433,10 @@  discard block
 block discarded – undo
433 433
         $echo = [];
434 434
 
435 435
         $echo['css'] = $this->getConfig('messengers.' . $moduleName . '.confirm_test') ? 
436
-            'success' :
437
-            '';
436
+            'success' : '';
438 437
         
439 438
         $echo['icon'] = $this->getConfig('messengers.' . $moduleName . '.confirm_test') ?
440
-            '<i class="fas fa-check"></i>' :
441
-            '<i class="fas fa-exclamation"></i>';
439
+            '<i class="fas fa-check"></i>' : '<i class="fas fa-exclamation"></i>';
442 440
 
443 441
         echo $echo[$echoType];
444 442
     }
Please login to merge, or discard this patch.
templates/panel/iptables_manager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
                     <select name="subnet" class="regular" id="subnet">
60 60
                         <option value="null">---</option>
61 61
                         <?php for ($i = 32; $i > 0; $i--) : ?>
62
-                            <?php $label = $i;  ?>
62
+                            <?php $label = $i; ?>
63 63
                             <?php if ($i === 8) $label = $i . ' (A)'; ?>
64 64
                             <?php if ($i === 16) $label = $i . ' (B)'; ?>
65 65
                             <?php if ($i === 24) $label = $i . ' (C)'; ?>
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                     <select name="subnet" class="regular" id="subnet">
72 72
                         <option value="null">---</option>
73 73
                         <?php for ($i = 128; $i > 0; $i--) : ?>
74
-                            <?php $label = $i;  ?>
74
+                            <?php $label = $i; ?>
75 75
                             <option value="<?php echo $i; ?>"><?php echo $label; ?></option>
76 76
                         <?php endfor; ?>
77 77
                     </select>
Please login to merge, or discard this patch.