mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Add nullable type
This commit is contained in:
parent
bebfac0ab6
commit
4f33330215
@ -481,7 +481,7 @@ class ConditionalReturnTypeTest extends TestCase
|
||||
/**
|
||||
* @psalm-return ($name is "foo" ? string : null)
|
||||
*/
|
||||
function get(string $name) {
|
||||
function get(string $name) : ?string {
|
||||
if ($name === "foo") {
|
||||
return "hello";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user