* @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));
* @inheritdoc
* @return string
*/
- function decode(Body $body) {
+ function decode(Body $body) : string {
$data = base64_decode($body, true);
if (false === $data) {