diff --git a/src/Mirror/Model/GZipTrait.php b/src/Mirror/Model/GZipTrait.php index 99b68105..fee4979d 100644 --- a/src/Mirror/Model/GZipTrait.php +++ b/src/Mirror/Model/GZipTrait.php @@ -59,7 +59,7 @@ protected function decode(string $gzip): string */ protected function isGzip(string $gzip): bool { - if (\mb_strpos($gzip, "\x1f"."\x8b"."\x08") === 0) { + if (str_starts_with($gzip, "\x1f" . "\x8b" . "\x08")) { return true; } diff --git a/src/Twig/PackagistExtension.php b/src/Twig/PackagistExtension.php index 52ff5d65..4cdceb81 100644 --- a/src/Twig/PackagistExtension.php +++ b/src/Twig/PackagistExtension.php @@ -174,7 +174,7 @@ public function truncate($string, $length) return ""; } - return mb_strlen($string) > $length ? mb_substr($string, 0, $length) . '...' : $string; + return strlen($string) > $length ? substr($string, 0, $length) . '...' : $string; } public function numericTest($val) diff --git a/src/Webhook/HmacOpensslCrypter.php b/src/Webhook/HmacOpensslCrypter.php index da21b64f..c7ce1444 100644 --- a/src/Webhook/HmacOpensslCrypter.php +++ b/src/Webhook/HmacOpensslCrypter.php @@ -52,7 +52,7 @@ public function encryptData(string $data): ?string private function removeHmac(string $data): array { $data = base64_decode($data); - $hashLength = mb_strlen(hash($this->hmacAlgo, $data, true), '8bit'); + $hashLength = strlen(hash($this->hmacAlgo, $data, true)); $hmac = substr($data, 0, $hashLength); $data = substr($data, $hashLength); diff --git a/src/Webhook/HookRequestExecutor.php b/src/Webhook/HookRequestExecutor.php index 82038b27..ad27b66d 100644 --- a/src/Webhook/HookRequestExecutor.php +++ b/src/Webhook/HookRequestExecutor.php @@ -142,7 +142,7 @@ private function hideSensitiveRequest(HookRequest $request, mixed $secrets = nul $opts = $this->hideSensitiveParameters(null, $request->jsonSerialize(), $secrets)[1]; if (is_array($headers = $opts['options']['headers'] ?? null)) { foreach ($headers as $name => $value) { - if (str_contains(mb_strtolower($name), 'authorization')) { + if (str_contains(strtolower($name), 'authorization')) { $headers[$name] = '***'; } }