friendship ended with social-app. php is my new best friend
1<?php
2declare(strict_types=1);
3
4namespace Lcobucci\JWT;
5
6use Lcobucci\JWT\Encoding\CannotEncodeContent;
7
8interface Encoder
9{
10 /**
11 * Encodes to JSON, validating the errors
12 *
13 * @return non-empty-string
14 *
15 * @throws CannotEncodeContent When something goes wrong while encoding.
16 */
17 public function jsonEncode(mixed $data): string;
18
19 /**
20 * Encodes to base64url
21 *
22 * @link http://tools.ietf.org/html/rfc4648#section-5
23 *
24 * @return ($data is non-empty-string ? non-empty-string : string)
25 */
26 public function base64UrlEncode(string $data): string;
27}