@@ -60,7 +60,7 @@ |
||
| 60 | 60 | |
| 61 | 61 | // @codeCoverageIgnoreStart |
| 62 | 62 | |
| 63 | - } catch(RedisException $e) { |
|
| 63 | + } catch (RedisException $e) { |
|
| 64 | 64 | echo $e->getMessage(); |
| 65 | 65 | } |
| 66 | 66 | |
@@ -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')); |
@@ -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 | */ |
| 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(); |
@@ -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 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | // Create a PDO instance. |
| 38 | 38 | $pdoInstance = new PDO( |
| 39 | 39 | 'mysql:host=' |
| 40 | - . $setting['host'] . ';dbname=' |
|
| 40 | + . $setting['host'] . ';dbname=' |
|
| 41 | 41 | . $setting['dbname'] . ';charset=' |
| 42 | 42 | . $setting['charset'] |
| 43 | 43 | , (string) $setting['user'] |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | // @codeCoverageIgnoreStart |
| 51 | 51 | |
| 52 | - } catch(PDOException $e) { |
|
| 52 | + } catch (PDOException $e) { |
|
| 53 | 53 | echo $e->getMessage(); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | if (is_array($ipList)) { |
| 221 | 221 | foreach ($ipList as $ip) { |
| 222 | 222 | |
| 223 | - if (0 === strpos($this->kernel->getCurrentUrl(), $ip['url']) ) { |
|
| 223 | + if (0 === strpos($this->kernel->getCurrentUrl(), $ip['url'])) { |
|
| 224 | 224 | |
| 225 | 225 | if ('allow' === $ip['rule']) { |
| 226 | 226 | $allowedList[] = $ip['ip']; |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | { |
| 290 | 290 | $setting = $this->getOption('failed_attempts_in_a_row', 'events'); |
| 291 | 291 | |
| 292 | - $enableDataCircle = $setting['data_circle']['enable'] ?: false; |
|
| 292 | + $enableDataCircle = $setting['data_circle']['enable'] ?: false; |
|
| 293 | 293 | $enableSystemFirewall = $setting['system_firewall']['enable'] ?: false; |
| 294 | 294 | |
| 295 | 295 | $this->kernel->setProperty('deny_attempt_enable', [ |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | $recordAttempt = $this->getOption('record_attempt'); |
| 307 | 307 | |
| 308 | 308 | $detectionPeriod = $recordAttempt['detection_period'] ?? 5; |
| 309 | - $timeToReset = $recordAttempt['time_to_reset'] ?? 1800; |
|
| 309 | + $timeToReset = $recordAttempt['time_to_reset'] ?? 1800; |
|
| 310 | 310 | |
| 311 | 311 | $this->kernel->setProperty('record_attempt_detection_period', $detectionPeriod); |
| 312 | 312 | $this->kernel->setProperty('reset_attempt_counter', $timeToReset); |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | protected function setIptablesBridgeDirectory(): void |
| 321 | 321 | { |
| 322 | 322 | $iptablesSetting = $this->getOption('config', 'iptables'); |
| 323 | - $this->kernel->setProperty('iptables_watching_folder', $iptablesSetting['watching_folder']); |
|
| 323 | + $this->kernel->setProperty('iptables_watching_folder', $iptablesSetting['watching_folder']); |
|
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | /** |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | |
| 335 | 335 | if ($sessionLimitSetting['enable']) { |
| 336 | 336 | |
| 337 | - $onlineUsers = $sessionLimitSetting['config']['count'] ?? 100; |
|
| 337 | + $onlineUsers = $sessionLimitSetting['config']['count'] ?? 100; |
|
| 338 | 338 | $alivePeriod = $sessionLimitSetting['config']['period'] ?? 300; |
| 339 | 339 | |
| 340 | 340 | $this->kernel->limitSession($onlineUsers, $alivePeriod); |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | |
| 362 | 362 | $lastResetTime = $cronjobSetting['config']['last_update']; |
| 363 | 363 | |
| 364 | - if (!empty($lastResetTime) ) { |
|
| 364 | + if (!empty($lastResetTime)) { |
|
| 365 | 365 | $lastResetTime = strtotime($lastResetTime); |
| 366 | 366 | } else { |
| 367 | 367 | // @codeCoverageIgnoreStart |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | <div class="card-body"> |
| 120 | 120 | <form action="<?php echo $form ?>" method="post" autocomplete="off"> |
| 121 | 121 | <div class="main-content"> |
| 122 | - <?php if (! empty($error)) : ?> |
|
| 122 | + <?php if (!empty($error)) : ?> |
|
| 123 | 123 | <div class="error-notice"> |
| 124 | 124 | <?php echo $error; ?> |
| 125 | 125 | </div> |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | <div class="input-box"> |
| 131 | 131 | <input type="password" name="s_pass" placeholder="Password" class="form-input" /> |
| 132 | 132 | </div> |
| 133 | - <?php if (! empty($captchas)) : ?> |
|
| 133 | + <?php if (!empty($captchas)) : ?> |
|
| 134 | 134 | <div class="input-box"> |
| 135 | 135 | <?php foreach ($captchas as $captcha) : ?> |
| 136 | 136 | <?php echo $captcha->form(); ?> |