From b466a965e7322d07f3b703ad6bf52ecb8df26b54 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 */ function base64_encode(string $string) : string {} +/** + * @psalm-pure + * + * @template T as string + * @param T $string + * @return T + */ +function bin2hex(string $string): string {} + /** * @psalm-pure *