Skip to content

Commit d10b325

Browse files
style: run prettier on changed files
1 parent c7f0b52 commit d10b325

4 files changed

Lines changed: 24 additions & 7 deletions

File tree

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/CertificateAuthorityRenew.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class CertificateAuthorityRenew extends Model {
120120
# Otherwise, continue with the renewal
121121
$this->newserial->value = cert_get_serial($ca_config['item']['crt']);
122122
$msg = "Renewed CA {$ca_config['item']['descr']} ({$ca_config['item']['refid']}) - Serial {$this->oldserial->value} -> {$this->newserial->value}";
123-
$this->log(level: LOG_ERR, message: $msg, logfile: "system");
123+
$this->log(level: LOG_ERR, message: $msg, logfile: 'system');
124124
$this->write_config($msg);
125125
}
126126

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/CertificateRenew.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class CertificateRenew extends Model {
120120
# Otherwise, continue with the renewal
121121
$this->newserial->value = cert_get_serial($cert_config['item']['crt']);
122122
$msg = "Renewed certificate {$cert_config['item']['descr']} ({$cert_config['item']['refid']}) - Serial {$this->oldserial->value} -> {$this->newserial->value}";
123-
$this->log(level: LOG_ERR, message: $msg, logfile: "system");
123+
$this->log(level: LOG_ERR, message: $msg, logfile: 'system');
124124
$this->write_config($msg);
125125
}
126126

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/RESTAPISettingsSync.inc

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,22 @@ class RESTAPISettingsSync extends Model {
122122
# Log an error if the HTTP failed
123123
if (!$response) {
124124
cprint(message: 'failed.' . PHP_EOL, condition: $print_status);
125-
self::log(level: LOG_ERR, message: "Failed to sync REST API settings to $ha_sync_host: no response received.");
125+
self::log(
126+
level: LOG_ERR,
127+
message: "Failed to sync REST API settings to $ha_sync_host: no response received.",
128+
);
126129
} elseif (!$response_json) {
127130
cprint(message: 'failed.' . PHP_EOL, condition: $print_status);
128-
self::log(level: LOG_ERR, message: "Failed to sync REST API settings to $ha_sync_host: received unexpected response.");
131+
self::log(
132+
level: LOG_ERR,
133+
message: "Failed to sync REST API settings to $ha_sync_host: received unexpected response.",
134+
);
129135
} elseif ($response_json['code'] !== 200) {
130136
cprint(message: 'failed.' . PHP_EOL, condition: $print_status);
131-
self::log(level: LOG_ERR, message: "Failed to sync REST API settings to $ha_sync_host: {$response_json['message']}");
137+
self::log(
138+
level: LOG_ERR,
139+
message: "Failed to sync REST API settings to $ha_sync_host: {$response_json['message']}",
140+
);
132141
} else {
133142
cprint(message: 'done.' . PHP_EOL, condition: $print_status);
134143
}

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/SSH.inc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,19 @@ class SSH extends Model {
5656
public function apply() {
5757
# Stop the sshd service
5858
killbyname('sshd');
59-
$this->log(level: LOG_ERR, message: 'secure shell configuration has changed. Stopping sshd.', logfile: "system");
59+
$this->log(
60+
level: LOG_ERR,
61+
message: 'secure shell configuration has changed. Stopping sshd.',
62+
logfile: 'system',
63+
);
6064

6165
# If sshd is still enabled, restart the sshd service using the new config
6266
if (config_path_enabled('system/ssh', 'enable')) {
63-
$this->log(level: LOG_ERR, message: 'secure shell configuration has changed. Restarting sshd.', logfile: "system");
67+
$this->log(
68+
level: LOG_ERR,
69+
message: 'secure shell configuration has changed. Restarting sshd.',
70+
logfile: 'system',
71+
);
6472
send_event('service restart sshd');
6573
}
6674
}

0 commit comments

Comments
 (0)