mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Add null
as a possible type parameter to strval
(#4100)
https://www.php.net/manual/en/language.types.string.php#language.types.string.casting mentions > `NULL` is always converted to an empty string. Which seems to indicate that it is a valid argument for it. As opposed to stringifying other types (like arrays), `strval(null)` does not cause a warning in PHP.
This commit is contained in:
parent
ee029a646b
commit
d1a42f6c69
@ -680,7 +680,7 @@ function bcdiv(string $left_operand, string $right_operand, int $scale = 0): ?st
|
||||
/**
|
||||
* @psalm-pure
|
||||
*
|
||||
* @param scalar|object $var
|
||||
* @param scalar|null|object $var
|
||||
* @return string The string value of var.
|
||||
*
|
||||
* @psalm-flow ($var) -> return
|
||||
|
Loading…
Reference in New Issue
Block a user