Skip to content

Commit 137e347

Browse files
Prettier run (#749)
Co-authored-by: Timotei <bondastimotei@gmail.com>
1 parent 525bf17 commit 137e347

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

assets/css/litespeed.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ h3 .litespeed-learn-more {
12091209
}
12101210

12111211
.rtl .litespeed-switch {
1212-
flex-direction: row-reverse;
1212+
flex-direction: row-reverse;
12131213
}
12141214

12151215
.litespeed-switch input:checked:active + label {

src/cloud.cls.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function init_qc()
140140
return;
141141
}
142142

143-
self::debug("echo succeeded");
143+
self::debug('echo succeeded');
144144

145145
// Load seperate thread echoed data from storage
146146
if (empty($echobox['wpapi_ts']) || empty($echobox['wpapi_signature_b64'])) {
@@ -182,7 +182,6 @@ public function link_qc()
182182
return;
183183
}
184184

185-
186185
$data = array(
187186
'wp_ts' => time(),
188187
);
@@ -285,12 +284,12 @@ public function wp_rest_echo()
285284

286285
$diff = time() - $_POST['wpapi_ts'];
287286
if (abs($diff) > 86400) {
288-
self::debugErr("WPAPI echo data timeout [diff] " . $diff);
287+
self::debugErr('WPAPI echo data timeout [diff] ' . $diff);
289288
return self::err('Echo data expired');
290289
}
291290

292291
$signature_b64 = $this->_sign_b64($_POST['wpapi_ts']);
293-
self::debug("Response to echo [signature_b64] " . $signature_b64);
292+
self::debug('Response to echo [signature_b64] ' . $signature_b64);
294293
return self::ok(array('signature_b64' => $signature_b64));
295294
}
296295

@@ -310,7 +309,7 @@ private function _validate_signature($signature_b64, $data, $from_wpapi = false)
310309
$signature = base64_decode($signature_b64);
311310
$is_valid = sodium_crypto_sign_verify_detached($signature, $data, $cloud_pk);
312311
} catch (\SodiumException $e) {
313-
self::debugErr("Decryption failed: " . $e->getMessage());
312+
self::debugErr('Decryption failed: ' . $e->getMessage());
314313
return false;
315314
}
316315
self::debug('Signature validation result: ' . ($is_valid ? 'true' : 'false'));
@@ -334,21 +333,21 @@ public function finish_qc_activation()
334333
);
335334
$is_valid = $this->_validate_signature($_GET['qc_signature_b64'], implode('', $data_to_validate_signature));
336335
if (!$is_valid) {
337-
self::debugErr("Failed to validate qc activation data");
336+
self::debugErr('Failed to validate qc activation data');
338337
Admin_Display::error(sprintf(__('Failed to validate %s activation data.', 'litespeed-cache'), 'QUIC.cloud'));
339338
return;
340339
}
341340

342-
self::debug("QC activation status: " . $_GET['qc_activated']);
341+
self::debug('QC activation status: ' . $_GET['qc_activated']);
343342
if (!in_array($_GET['qc_activated'], array('anonymous', 'linked', 'cdn'))) {
344-
self::debugErr("Failed to parse qc activation status");
343+
self::debugErr('Failed to parse qc activation status');
345344
Admin_Display::error(sprintf(__('Failed to parse %s activation status.', 'litespeed-cache'), 'QUIC.cloud'));
346345
return;
347346
}
348347

349348
$diff = time() - $_GET['qc_ts'];
350349
if (abs($diff) > 86400) {
351-
self::debugErr("QC activation data timeout [diff] " . $diff);
350+
self::debugErr('QC activation data timeout [diff] ' . $diff);
352351
Admin_Display::error(sprintf(__('%s activation data expired.', 'litespeed-cache'), 'QUIC.cloud'));
353352
return;
354353
}
@@ -389,7 +388,7 @@ public function reset_qc()
389388

390389
Admin_Display::success(sprintf(__('Reset %s activation successfully.', 'litespeed-cache'), 'QUIC.cloud'));
391390
wp_redirect(get_admin_url(null, 'admin.php?page=litespeed'));
392-
exit;
391+
exit();
393392
}
394393

395394
/**

src/debug2.cls.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static function FilePath($type)
8989
if ($type == 'debug.purge') {
9090
$type = 'purge';
9191
}
92-
$key = defined('AUTH_KEY') ? AUTH_KEY : md5(__FILE__);
92+
$key = defined('AUTH_KEY') ? AUTH_KEY : md5(__FILE__);
9393
$rand = substr(md5(substr($key, -16)), -16);
9494
return $type . $rand . '.log';
9595
}

src/lang.cls.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ public static function maybe_translate($raw_string)
4646
{
4747
$map = array(
4848
'auto_alias_failed_cdn' =>
49-
__('Unable to automatically add %1$s as a Domain Alias for main %2$s domain, due to potential CDN conflict.', 'litespeed-cache') .
49+
__('Unable to automatically add %1$s as a Domain Alias for main %2$s domain, due to potential CDN conflict.', 'litespeed-cache') .
5050
' ' .
5151
Doc::learn_more('https://quic.cloud/docs/cdn/dns/how-to-setup-domain-alias/', false, false, false, true),
5252

5353
'auto_alias_failed_uid' =>
54-
__('Unable to automatically add %1$s as a Domain Alias for main %2$s domain.', 'litespeed-cache') .
54+
__('Unable to automatically add %1$s as a Domain Alias for main %2$s domain.', 'litespeed-cache') .
5555
' ' .
5656
__('Alias is in use by another QUIC.cloud account.', 'litespeed-cache') .
5757
' ' .

src/object-cache.cls.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,8 @@ private function _connect()
350350
$failed = true;
351351
}
352352
restore_error_handler();
353-
} else { // Connect to Memcached
353+
} else {
354+
// Connect to Memcached
354355
if ($this->_cfg_persistent) {
355356
$this->_conn = new \Memcached($this->_get_mem_id());
356357

0 commit comments

Comments
 (0)