@@ -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->loadViewPart('panel/js/chart', $data); |
| 128 | 128 | } |
@@ -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"> |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | </tr> |
| 89 | 89 | </thead> |
| 90 | 90 | <tbody> |
| 91 | - <?php if (! empty($ip_details)) : ?> |
|
| 91 | + <?php if (!empty($ip_details)) : ?> |
|
| 92 | 92 | <?php foreach ($ip_details as $ip => $ipInfo) : ?> |
| 93 | 93 | <tr> |
| 94 | 94 | <td> |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | </table> |
| 112 | 112 | </div> |
| 113 | 113 | <div class="so-timezone"> |
| 114 | - <?php if (! empty($last_cached_time)) : ?> |
|
| 114 | + <?php if (!empty($last_cached_time)) : ?> |
|
| 115 | 115 | <?php _e('panel', 'log_label_cache_time', 'Report generated time'); ?>: <strong class="text-info"><?php echo $last_cached_time; ?></strong> |
| 116 | 116 | |
| 117 | 117 | <?php endif; ?> |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | <?php |
| 123 | 123 | |
| 124 | - if (! empty($period_data)) { |
|
| 124 | + if (!empty($period_data)) { |
|
| 125 | 125 | $data['period_data'] = $period_data; |
| 126 | 126 | $data['past_seven_hours'] = $past_seven_hours; |
| 127 | 127 | $this->loadViewPart('panel/js/chart', $data); |
@@ -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 |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | define('SHIELDON_VIEW', true); |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | - $viewFilePath = __DIR__ . '/../../../templates/' . $page . '.php'; |
|
| 172 | + $viewFilePath = __DIR__ . '/../../../templates/' . $page . '.php'; |
|
| 173 | 173 | |
| 174 | 174 | if (!empty($data)) { |
| 175 | 175 | extract($data); |
@@ -451,12 +451,10 @@ discard block |
||
| 451 | 451 | protected function messengerAjaxStatus(string $moduleName, string $echoType = 'css'): void |
| 452 | 452 | { |
| 453 | 453 | $echo['css'] = $this->getConfig('messengers.' . $moduleName . '.confirm_test') ? |
| 454 | - 'success' : |
|
| 455 | - ''; |
|
| 454 | + 'success' : ''; |
|
| 456 | 455 | |
| 457 | 456 | $echo['icon'] = $this->getConfig('messengers.' . $moduleName . '.confirm_test') ? |
| 458 | - '<i class="fas fa-check"></i>' : |
|
| 459 | - '<i class="fas fa-exclamation"></i>'; |
|
| 457 | + '<i class="fas fa-check"></i>' : '<i class="fas fa-exclamation"></i>'; |
|
| 460 | 458 | |
| 461 | 459 | echo $echo[$echoType]; |
| 462 | 460 | } |
@@ -177,10 +177,10 @@ discard block |
||
| 177 | 177 | // Create default log files. |
| 178 | 178 | if (is_writable($iptablesWatchingFolder)) { |
| 179 | 179 | fopen($iptablesWatchingFolder . '/iptables_queue.log', 'w+'); |
| 180 | - fopen($iptablesWatchingFolder . '/ipv4_status.log', 'w+'); |
|
| 181 | - fopen($iptablesWatchingFolder . '/ipv6_status.log', 'w+'); |
|
| 182 | - fopen($iptablesWatchingFolder . '/ipv4_command.log', 'w+'); |
|
| 183 | - fopen($iptablesWatchingFolder . '/ipv6_command.log', 'w+'); |
|
| 180 | + fopen($iptablesWatchingFolder . '/ipv4_status.log', 'w+'); |
|
| 181 | + fopen($iptablesWatchingFolder . '/ipv6_status.log', 'w+'); |
|
| 182 | + fopen($iptablesWatchingFolder . '/ipv4_command.log', 'w+'); |
|
| 183 | + fopen($iptablesWatchingFolder . '/ipv6_command.log', 'w+'); |
|
| 184 | 184 | |
| 185 | 185 | return $result; |
| 186 | 186 | } |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | (string) $db['user'], |
| 254 | 254 | (string) $db['pass'] |
| 255 | 255 | ); |
| 256 | - } catch(PDOException $e) { |
|
| 256 | + } catch (PDOException $e) { |
|
| 257 | 257 | |
| 258 | 258 | $result = false; |
| 259 | 259 | |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | try { |
| 315 | 315 | new PDO('sqlite:' . $sqliteFilePath); |
| 316 | 316 | |
| 317 | - } catch(PDOException $e) { |
|
| 317 | + } catch (PDOException $e) { |
|
| 318 | 318 | $this->pushMessage('error', $e->getMessage()); |
| 319 | 319 | $result = false; |
| 320 | 320 | } |
@@ -363,11 +363,11 @@ discard block |
||
| 363 | 363 | $redis = new Redis(); |
| 364 | 364 | $redis->connect( |
| 365 | 365 | (string) $this->getConfig('drivers.redis.host'), |
| 366 | - (int) $this->getConfig('drivers.redis.port') |
|
| 366 | + (int) $this->getConfig('drivers.redis.port') |
|
| 367 | 367 | ); |
| 368 | 368 | unset($redis); |
| 369 | 369 | |
| 370 | - } catch(RedisException $e) { |
|
| 370 | + } catch (RedisException $e) { |
|
| 371 | 371 | $this->pushMessage('error', $e->getMessage()); |
| 372 | 372 | $result = false; |
| 373 | 373 | } |
@@ -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->loadViewPart('panel/js/chart', $data); |
| 128 | 128 | } |
@@ -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->loadViewPart('panel/js/chart', $data); |
| 128 | 128 | } |
@@ -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->loadViewPart('panel/js/chart', $data); |
| 128 | 128 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | 'colors' => [ |
| 111 | 111 | 'background' => [255, 255, 255], |
| 112 | 112 | 'border' => [153, 200, 255], |
| 113 | - 'text' => [51, 153, 255], |
|
| 113 | + 'text' => [51, 153, 255], |
|
| 114 | 114 | 'grid' => [153, 200, 255] |
| 115 | 115 | ] |
| 116 | 116 | ]; |
@@ -329,14 +329,12 @@ discard block |
||
| 329 | 329 | { |
| 330 | 330 | // Determine angle and position. |
| 331 | 331 | $angle = ($this->length >= 6) ? |
| 332 | - mt_rand(-($this->length - 6), ($this->length - 6)) : |
|
| 333 | - 0; |
|
| 332 | + mt_rand(-($this->length - 6), ($this->length - 6)) : 0; |
|
| 334 | 333 | |
| 335 | 334 | $xAxis = mt_rand(6, (360 / $this->length) - 16); |
| 336 | 335 | |
| 337 | 336 | $yAxis = ($angle >= 0) ? |
| 338 | - mt_rand($imgHeight, $imgWidth) : |
|
| 339 | - mt_rand(6, $imgHeight); |
|
| 337 | + mt_rand($imgHeight, $imgWidth) : mt_rand(6, $imgHeight); |
|
| 340 | 338 | |
| 341 | 339 | // Create the spiral pattern. |
| 342 | 340 | $theta = 1; |