diff --git a/src/Encoder/GZipCompressionDecorator.php b/src/Encoder/GZipCompressionDecorator.php index 5b92363..39231f8 100644 --- a/src/Encoder/GZipCompressionDecorator.php +++ b/src/Encoder/GZipCompressionDecorator.php @@ -25,7 +25,7 @@ public function __construct(private UriEncoderInterface $encoder) {} public function encodeUri(string $data): string { - return $this->encoder->encodeUri((string) gzcompress($data)); + return $this->encoder->encodeUri((string) @gzcompress($data)); } public function decodeUri(string $data): ?string @@ -37,7 +37,7 @@ public function decodeUri(string $data): ?string } try { - $compressed = gzuncompress($decoded); + $compressed = @gzuncompress($decoded); return $compressed === false ? null : $compressed; } catch (\Throwable) { diff --git a/src/UriEncoderInterface.php b/src/UriEncoderInterface.php index b28814e..942d902 100644 --- a/src/UriEncoderInterface.php +++ b/src/UriEncoderInterface.php @@ -18,13 +18,9 @@ */ interface UriEncoderInterface { - /** - * Encodes the URI to a usable format. - */ + /** Encodes the URI to a usable format. */ public function encodeUri(string $data): string; - /** - * Decodes the encoded URI back to the original format. - */ + /** Decodes the encoded URI back to the original format. */ public function decodeUri(string $data): ?string; }