Skip to content

Is phpstan supposed to complain about missing return type for functions with no return? #6102

Discussion options

You must be logged in to vote

if a function has no return statement, an implicit @return void should be inferred...

You can't assume that. Missing return type is treated as an implicit mixed.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by marekdedic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
2 participants