@@ -69,7 +69,7 @@ |
||
69 | 69 | |
70 | 70 | $messenger = new SmtpTest($user, $pass, $host, (int) $port); |
71 | 71 | |
72 | - foreach($recipients as $recipient) { |
|
72 | + foreach ($recipients as $recipient) { |
|
73 | 73 | if (filter_var($recipient, FILTER_VALIDATE_EMAIL)) { |
74 | 74 | $messenger->addRecipient($recipient); |
75 | 75 | } |
@@ -30,11 +30,11 @@ |
||
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 | - $host = $setting['config']['host'] ?? ''; |
|
36 | - $user = $setting['config']['user'] ?? ''; |
|
37 | - $pass = $setting['config']['pass'] ?? ''; |
|
35 | + $host = $setting['config']['host'] ?? ''; |
|
36 | + $user = $setting['config']['user'] ?? ''; |
|
37 | + $pass = $setting['config']['pass'] ?? ''; |
|
38 | 38 | $port = $setting['config']['port'] ?? ''; |
39 | 39 | |
40 | 40 | $instance = new Smtp($user, $pass, $host, (int) $port); |
@@ -30,7 +30,7 @@ |
||
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 | } |
@@ -30,7 +30,7 @@ |
||
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(); |
@@ -30,10 +30,10 @@ |
||
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')); |
@@ -29,10 +29,10 @@ |
||
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 | } |
@@ -236,11 +236,11 @@ |
||
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; |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $data['period_data'] = $ipDetailsCachedData['period_data']; |
128 | 128 | $lastCachedTime = date('Y-m-d H:i:s', $ipDetailsCachedData['time']); |
129 | 129 | |
130 | - if ('today' === $type ) { |
|
130 | + if ('today' === $type) { |
|
131 | 131 | $ipDetailsCachedData = $logCacheHandler->get('past_seven_hours'); |
132 | 132 | $data['past_seven_hours'] = $ipDetailsCachedData['period_data']; |
133 | 133 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | $logCacheHandler->save($type, $data); |
143 | 143 | |
144 | - if ('today' === $type ) { |
|
144 | + if ('today' === $type) { |
|
145 | 145 | $this->parser->prepare('past_seven_hours'); |
146 | 146 | $data['past_seven_hours'] = $this->parser->getParsedPeriodData(); |
147 | 147 | |
@@ -172,11 +172,11 @@ discard block |
||
172 | 172 | private function operationTemplateVarsOfComponents(array $data = []): array |
173 | 173 | { |
174 | 174 | $data['components'] = [ |
175 | - 'Ip' => (!empty($this->kernel->component['Ip'])) ? true : false, |
|
175 | + 'Ip' => (!empty($this->kernel->component['Ip'])) ? true : false, |
|
176 | 176 | 'TrustedBot' => (!empty($this->kernel->component['TrustedBot'])) ? true : false, |
177 | - 'Header' => (!empty($this->kernel->component['Header'])) ? true : false, |
|
178 | - 'Rdns' => (!empty($this->kernel->component['Rdns'])) ? true : false, |
|
179 | - 'UserAgent' => (!empty($this->kernel->component['UserAgent'])) ? true : false, |
|
177 | + 'Header' => (!empty($this->kernel->component['Header'])) ? true : false, |
|
178 | + 'Rdns' => (!empty($this->kernel->component['Rdns'])) ? true : false, |
|
179 | + 'UserAgent' => (!empty($this->kernel->component['UserAgent'])) ? true : false, |
|
180 | 180 | ]; |
181 | 181 | |
182 | 182 | return $data; |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | if ( |
98 | 98 | isset($_SERVER['HTTP_HOST']) && |
99 | 99 | strpos($_SERVER['HTTP_HOST'], 'project.lo') !== false |
100 | -) { |
|
100 | +) { |
|
101 | 101 | // `shieldon-doc.lo` is the virtual domain that Terry is using to design CSS for Firewall Panel UI. |
102 | 102 | $staticSrc = 'http://shieldon-doc.lo/static'; |
103 | 103 | } |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | </div> |
331 | 331 | </div> |
332 | 332 | </div> |
333 | - <?php if (! empty($this->messages)) : ?> |
|
333 | + <?php if (!empty($this->messages)) : ?> |
|
334 | 334 | <div id="message-modal" class="modal fade" tabindex="-1" role="dialog"> |
335 | 335 | <div class="modal-dialog modal-dialog-centered modal-lightbox" role="document"> |
336 | 336 | <div class="modal-content"> |