From 4b1adaafecc98f0233f36d2b7a0ab3db7be431fc Mon Sep 17 00:00:00 2001 From: Thomas Gerbet Date: Tue, 23 Aug 2022 14:01:44 +0200 Subject: [PATCH] Allow *bin2hex and *bin2base64 functions to keep non-empty-string type Those functions should not return a string when they receive a non-empty-string in input. The following example is expected to work: ```php return + * @template T as string + * @param T $string + * @return (T is non-empty-string ? non-empty-string : string) */ function base64_encode(string $string) : string {} +/** + * @psalm-pure + * + * @template T as string + * @param T $string + * @return (T is non-empty-string ? non-empty-string : string) + */ +function bin2hex(string $string): string {} + /** * @psalm-pure *