getCode(), $throwable); } } /** * @throws RuntimeException if the payload cannot be decoded * * @return mixed */ public static function decode(string $payload) { try { return json_decode($payload, true, 512, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); } catch (Throwable $throwable) { throw new RuntimeException('Invalid content.', $throwable->getCode(), $throwable); } } }