@@ -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 | } |
@@ -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 | ]; |
@@ -286,7 +286,7 @@ |
||
286 | 286 | */ |
287 | 287 | protected $firewallType = 'self'; |
288 | 288 | |
289 | - /** |
|
289 | + /** |
|
290 | 290 | * The reason code of a user to be allowed or denied. |
291 | 291 | * |
292 | 292 | * @var int|null |
@@ -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 |
@@ -79,7 +79,7 @@ |
||
79 | 79 | $str = implode( |
80 | 80 | '', |
81 | 81 | array_map( |
82 | - function ($word) { |
|
82 | + function($word) { |
|
83 | 83 | return ucwords($word); |
84 | 84 | }, |
85 | 85 | $str |