@@ -45,7 +45,7 @@ |
||
| 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 | } |
@@ -49,19 +49,19 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | <div class="filter-status"> |
| 204 | 204 | <div class="heading"><?php _e('panel', 'overview_label_action_logger', 'Action Logger'); ?></div> |
| 205 | 205 | <div class="nums"> |
| 206 | - <?php echo $data['action_logger'] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?> |
|
| 206 | + <?php echo $data['action_logger'] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?> |
|
| 207 | 207 | </div> |
| 208 | 208 | <div class="note"><?php _e('panel', 'overview_note_action_logger', 'Record every visitor’s behavior.'); ?></div> |
| 209 | 209 | </div> |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | <div class="filter-status"> |
| 223 | 223 | <div class="heading"><?php _e('panel', 'overview_label_recaptcha', 'reCAPTCHA'); ?></div> |
| 224 | 224 | <div class="nums"> |
| 225 | - <?php echo $captcha['recaptcha'] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?> |
|
| 225 | + <?php echo $captcha['recaptcha'] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?> |
|
| 226 | 226 | </div> |
| 227 | 227 | <div class="note"><?php _e('panel', 'overview_note_recaptcha', 'Provided by Google.'); ?></div> |
| 228 | 228 | </div> |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | <div class="filter-status"> |
| 232 | 232 | <div class="heading"><?php _e('panel', 'overview_label_image_captcha', 'Image Captcha'); ?></div> |
| 233 | 233 | <div class="nums"> |
| 234 | - <?php echo $captcha['imagecaptcha'] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?> |
|
| 234 | + <?php echo $captcha['imagecaptcha'] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?> |
|
| 235 | 235 | </div> |
| 236 | 236 | <div class="note"><?php _e('panel', 'overview_note_image_captcha', 'A simple text-in-image Captcha.'); ?></div> |
| 237 | 237 | </div> |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | <div class="filter-status"> |
| 252 | 252 | <div class="heading"><?php _e('panel', 'overview_label_' . $k, ''); ?></div> |
| 253 | 253 | <div class="nums"> |
| 254 | - <?php echo $messengers[$k] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?> |
|
| 254 | + <?php echo $messengers[$k] ? '<i class="far fa-play-circle"></i>' : '<i class="far fa-stop-circle"></i>'; ?> |
|
| 255 | 255 | </div> |
| 256 | 256 | <div class="note"><?php _e('panel', 'overview_note_' . $k, ''); ?></div> |
| 257 | 257 | </div> |
@@ -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; |
@@ -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,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 | } |
@@ -614,9 +614,9 @@ |
||
| 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 | ]; |
@@ -57,7 +57,7 @@ discard block |
||
| 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 |
||
| 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 |