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
Psalm, rightfully, does not complain when encountering an actual method named callable.
callable
But it does complain if the method is in a @method docblock.
@method
Note: this is specific to "callable". Method named as other types such as "string", "int" or "bool" do not cause any issue.
See https://psalm.dev/r/c91fa34de9
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php /** * @method static Type string() * @method static Type int() * @method static Type float() * * @method Type callable() */ class Foo { public function __call(string $name, array $arguments): string { if ($name === 'callable') { return 'Callable is a valid method name'; } throw new \Error('Invalid method'); } } class Bar { public function callable(): void { } public function string(): void { } public function int(): void { } public function float(): void { } }
Psalm output (using commit 08afc45): ERROR: InvalidDocblock - 10:7 - callable() is not a valid method in docblock for Foo
Sorry, something went wrong.
No branches or pull requests
Psalm, rightfully, does not complain when encountering an actual method named
callable
.But it does complain if the method is in a
@method
docblock.Note: this is specific to "callable". Method named as other types such as "string", "int" or "bool" do not cause any issue.
See https://psalm.dev/r/c91fa34de9
The text was updated successfully, but these errors were encountered: