'integer', 'deleted_at' => 'immutable_datetime', 'expires_at' => 'immutable_datetime']; } /** @param array $snapshot */ public static function encryptSnapshot(array $snapshot): string { return Crypt::encryptString(json_encode($snapshot, JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE)); } /** @return array */ public static function decryptSnapshot(string $snapshot): array { $decoded = json_decode(Crypt::decryptString($snapshot), true, 32, JSON_THROW_ON_ERROR); return is_array($decoded) ? $decoded : []; } }