Skip to content

Do not consider arrays with an unknown class string to be a callback#1404

Merged
ondrejmirtes merged 1 commit intophpstan:1.7.xfrom
herndlm:fix-7389
Jun 8, 2022
Merged

Do not consider arrays with an unknown class string to be a callback#1404
ondrejmirtes merged 1 commit intophpstan:1.7.xfrom
herndlm:fix-7389

Conversation

@herndlm
Copy link
Copy Markdown
Contributor

@herndlm herndlm commented Jun 7, 2022

Closes phpstan/phpstan#7389

E.g. ['', ''] was considered to be an unknown callable which messes up UnusedPrivateMethodRuleTest. I was not sure about this, I guess if people only scan parts of their code, this could turn out to be a problem? But as this is considered bad-practice anyways, maybe this is fine.
Let me know if I missed something.

@herndlm
Copy link
Copy Markdown
Contributor Author

herndlm commented Jun 7, 2022

I wanted to write callable in the title. Not callback! xD

@herndlm herndlm marked this pull request as ready for review June 7, 2022 16:24
@ondrejmirtes
Copy link
Copy Markdown
Member

Nice, thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unused method not found in the analysis.

2 participants