Skip to content
New issue

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

error on missing types in @param #8178

Closed
staabm opened this issue Oct 17, 2022 · 2 comments
Closed

error on missing types in @param #8178

staabm opened this issue Oct 17, 2022 · 2 comments

Comments

@staabm
Copy link
Contributor

staabm commented Oct 17, 2022

Feature request

from time to time someone forgets to add a type in the @param phpdoc, like e.g.

https://phpstan.org/r/0e573fd0-fbc5-44a7-9faa-286030f46ada

could/should we make phpstan error, that the type is missing?

@ondrejmirtes
Copy link
Member

This is not a bug. We already have a type - DateTimeImmutable. Previous this was a parse error but is allowed after phpstan/phpdoc-parser#127 (discussion phpstan/phpdoc-parser#77).

You can write a custom rule easily because it's a separate AST node.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants