We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given the following code:
function takesString(string $s) : void {} function shouldTakeString($s) : void { takesString($s); }
with --add-missing-param-types, Psalm would return
--add-missing-param-types
function takesString(string $s) : void {} function shouldTakeString(string $s) : void { takesString($s); }
In this way we could approximate Hindley-Milner type inference, while improving the underlying PHP code.
It would do nothing with this input:
function takesString(string $s) : void {} function shouldTakeString($s) : void { if (is_string($s)) { takesString($s); } }
The text was updated successfully, but these errors were encountered:
Suggest types when complaining of untype params
73694ab
Ref #204
194bb31
No branches or pull requests
Given the following code:
with
--add-missing-param-types
, Psalm would returnIn this way we could approximate Hindley-Milner type inference, while improving the underlying PHP code.
It would do nothing with this input:
The text was updated successfully, but these errors were encountered: