update to PHP-8.1
[m6w6/seekat] / lib / API / ContentType / Handler / Base64.php
index 979c97d055fe8e11dc83f67f5ad56bee40cc82b9..342719d227cb0942b4d5d76e11eafd9b0d5e9e6b 100644 (file)
@@ -20,7 +20,7 @@ final class Base64 implements Handler {
         * @inheritdoc
         * @param string $data
         */
-       function encode($data): Body {
+       function encode(mixed $data): Body {
                if (!is_scalar($data)) {
                        throw new InvalidArgumentException(
                                "BASE64 encoding argument must be scalar, got ".typeof($data));
@@ -32,7 +32,7 @@ final class Base64 implements Handler {
         * @inheritdoc
         * @return string
         */
-       function decode(Body $body) {
+       function decode(Body $body) : string {
                $data = base64_decode($body, true);
 
                if (false === $data) {