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
I just realized that Psalm doesn't complain if you declare a class with template params, and use it somewhere without providing these params:
/** * @template K * @template V */ class Map { } /** * @param Map $map */ function test(Map $map): void { }
https://psalm.dev/r/6b7f6de782 https://psalm.dev/r/7ee714cedb
I could not find an option to make Psalm complain in this case. Would it be possible to add it?
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php /** * @template K * @template V */ class Map { } /** * @param Map $map */ function test(Map $map): void { /** @psalm-trace $map */ }
Psalm output (using commit ef3b018): INFO: Trace - 16:0 - $map: Map INFO: UnusedParam - 14:19 - Param map is never referenced in this method
<?php /** * @template K of object * @template V */ class Map { } /** * @param Map $map */ function test(Map $map): void { /** @psalm-trace $map */ }
Psalm output (using commit ef3b018): INFO: Trace - 16:0 - $map: Map<object, mixed> INFO: UnusedParam - 14:19 - Param map is never referenced in this method
Sorry, something went wrong.
No branches or pull requests
I just realized that Psalm doesn't complain if you declare a class with template params, and use it somewhere without providing these params:
https://psalm.dev/r/6b7f6de782
https://psalm.dev/r/7ee714cedb
I could not find an option to make Psalm complain in this case. Would it be possible to add it?
The text was updated successfully, but these errors were encountered: