@@ -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 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | $ip = $ipData[0]; |
258 | 258 | $cidr = (int) $ipData[1] ?? 32; |
259 | 259 | |
260 | - $result[0] = long2ip((ip2long($ip)) & ((-1 << (32 - $cidr)))); |
|
260 | + $result[0] = long2ip((ip2long($ip)) & ((-1 << (32 - $cidr)))); |
|
261 | 261 | $result[1] = long2ip((ip2long($ip)) + pow(2, (32 - $cidr)) - 1); |
262 | 262 | |
263 | 263 | if ($isDecimal) { |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | $result[1] = ip2long($result[1]); |
266 | 266 | } |
267 | 267 | |
268 | - return $result; |
|
268 | + return $result; |
|
269 | 269 | } |
270 | 270 | |
271 | 271 | /** |
@@ -40,19 +40,19 @@ discard block |
||
40 | 40 | protected $deniedList = [ |
41 | 41 | |
42 | 42 | // Backlink crawlers |
43 | - 'Ahrefs', // http://ahrefs.com/robot/ |
|
44 | - 'roger', // rogerbot (SEOMOZ) |
|
45 | - 'moz.com', // SEOMOZ crawlers |
|
46 | - 'MJ12bot', // Majestic crawlers |
|
47 | - 'findlinks', // http://wortschatz.uni-leipzig.de/findlinks |
|
48 | - 'Semrush', // http://www.semrush.com/bot.html |
|
43 | + 'Ahrefs', // http://ahrefs.com/robot/ |
|
44 | + 'roger', // rogerbot (SEOMOZ) |
|
45 | + 'moz.com', // SEOMOZ crawlers |
|
46 | + 'MJ12bot', // Majestic crawlers |
|
47 | + 'findlinks', // http://wortschatz.uni-leipzig.de/findlinks |
|
48 | + 'Semrush', // http://www.semrush.com/bot.html |
|
49 | 49 | |
50 | 50 | // Web information crawlers |
51 | - 'domain', // Domain name information crawlers. |
|
52 | - 'copyright', // Copyright information crawlers. |
|
51 | + 'domain', // Domain name information crawlers. |
|
52 | + 'copyright', // Copyright information crawlers. |
|
53 | 53 | |
54 | 54 | // Others |
55 | - 'archive', // Wayback machine |
|
55 | + 'archive', // Wayback machine |
|
56 | 56 | ]; |
57 | 57 | |
58 | 58 | /** |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | public function __construct(array $deniedList = []) |
66 | 66 | { |
67 | 67 | if (!empty($deniedList)) { |
68 | - $this->deniedList =$deniedList; |
|
68 | + $this->deniedList = $deniedList; |
|
69 | 69 | } |
70 | 70 | } |
71 | 71 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | } |
87 | 87 | |
88 | 88 | if (!empty($this->deniedList)) { |
89 | - if (preg_match('/(' . implode('|', $this->deniedList). ')/i', $userAgent)) { |
|
89 | + if (preg_match('/(' . implode('|', $this->deniedList) . ')/i', $userAgent)) { |
|
90 | 90 | return (new Response)->withStatus(self::HTTP_STATUS_CODE); |
91 | 91 | } |
92 | 92 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | public function __construct(array $fieldList = []) |
52 | 52 | { |
53 | 53 | if (!empty($fieldList)) { |
54 | - $this->fieldList =$fieldList; |
|
54 | + $this->fieldList = $fieldList; |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 |
@@ -53,8 +53,8 @@ |
||
53 | 53 | |
54 | 54 | // Check if your IP is from localhost, perhaps your are in development environment? |
55 | 55 | if ( |
56 | - (substr($this->ip, 0 , 8) === '192.168.') || |
|
57 | - (substr($this->ip, 0 , 6) === '127.0.') |
|
56 | + (substr($this->ip, 0, 8) === '192.168.') || |
|
57 | + (substr($this->ip, 0, 6) === '127.0.') |
|
58 | 58 | ) { |
59 | 59 | $this->setRdns('localhost'); |
60 | 60 | } else { |
@@ -33,7 +33,7 @@ |
||
33 | 33 | */ |
34 | 34 | public function __construct(array &$data = []) |
35 | 35 | { |
36 | - $this->data =& $data; |
|
36 | + $this->data = & $data; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -167,7 +167,7 @@ |
||
167 | 167 | $masked = implode('.', $tmp); |
168 | 168 | |
169 | 169 | } else { |
170 | - $masked = str_repeat('*', strlen($str) - 6) . substr(str, -6); |
|
170 | + $masked = str_repeat('*', strlen($str) - 6) . substr(str, -6); |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | return $masked; |
@@ -60,9 +60,12 @@ |
||
60 | 60 | </div> |
61 | 61 | </div> |
62 | 62 | </div> |
63 | - <?php else : ?> |
|
63 | + <?php else { |
|
64 | + : ?> |
|
64 | 65 | <div class="alert alert-danger"> |
65 | - <?php _e('panel', 'log_msg_no_logger', 'Sorry, you have to implement ActionLogger to use this function.'); ?> |
|
66 | + <?php _e('panel', 'log_msg_no_logger', 'Sorry, you have to implement ActionLogger to use this function.'); |
|
67 | +} |
|
68 | +?> |
|
66 | 69 | |
67 | 70 | </div> |
68 | 71 | <?php endif; ?> |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | ?> |
19 | 19 | |
20 | 20 | <div class="so-dashboard"> |
21 | - <?php if (! empty($period_data)) : ?> |
|
21 | + <?php if (!empty($period_data)) : ?> |
|
22 | 22 | <div class="so-flex"> |
23 | 23 | <div class="so-board"> |
24 | 24 | <div class="board-field left"> |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | </tr> |
90 | 90 | </thead> |
91 | 91 | <tbody> |
92 | - <?php if (! empty($ip_details)) : ?> |
|
92 | + <?php if (!empty($ip_details)) : ?> |
|
93 | 93 | <?php foreach ($ip_details as $ip => $ipInfo) : ?> |
94 | 94 | <tr> |
95 | 95 | <td> |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | </table> |
113 | 113 | </div> |
114 | 114 | <div class="so-timezone"> |
115 | - <?php if (! empty($last_cached_time)) : ?> |
|
115 | + <?php if (!empty($last_cached_time)) : ?> |
|
116 | 116 | <?php _e('panel', 'log_label_cache_time', 'Report generated time'); ?>: <strong class="text-info"><?php echo $last_cached_time; ?></strong> |
117 | 117 | |
118 | 118 | <?php endif; ?> |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | <?php |
124 | 124 | |
125 | - if (! empty($period_data)) { |
|
125 | + if (!empty($period_data)) { |
|
126 | 126 | $data['period_data'] = $period_data; |
127 | 127 | $this->_include('panel/js/chart', $data); |
128 | 128 | } |