mirror of
https://github.com/danog/psalm.git
synced 2024-12-04 18:48:03 +01:00
Merge pull request #8431 from LeSuisse/bin2hex-base64-stub
Allow *bin2hex and *bin2base64 functions to keep non-empty-string type
This commit is contained in:
commit
034a796f84
@ -334,6 +334,22 @@ function fclose(&$stream) : bool
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @psalm-pure
|
||||
* @template T as string
|
||||
* @param T $string
|
||||
* @return (T is non-empty-string ? non-empty-string : string)
|
||||
*/
|
||||
function sodium_bin2base64(string $string, int $id): string
|
||||
|
||||
/**
|
||||
* @psalm-pure
|
||||
* @template T as string
|
||||
* @param T $string
|
||||
* @return (T is non-empty-string ? non-empty-string : string)
|
||||
*/
|
||||
function sodium_bin2hex(string $string): string {}
|
||||
|
||||
/**
|
||||
* @param string $string
|
||||
* @param-out null $string
|
||||
@ -1308,9 +1324,21 @@ function base64_decode(string $string, bool $strict = false) {}
|
||||
* @psalm-pure
|
||||
*
|
||||
* @psalm-flow ($string) -> 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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user