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

Generic/NestingLevel: support anonymous functions #761

Open
1 of 2 tasks
rodrigoprimo opened this issue Dec 9, 2024 · 1 comment
Open
1 of 2 tasks

Generic/NestingLevel: support anonymous functions #761

rodrigoprimo opened this issue Dec 9, 2024 · 1 comment

Comments

@rodrigoprimo
Copy link
Contributor

Is your feature request related to a problem?

Similar to #742, while working on improving code coverage for Generic.Metrics.NestingLevel, I noticed that the sniff doesn't check the nesting level of anonymous functions, and I believe it should.

@jrfnl
Copy link
Member

jrfnl commented Dec 10, 2024

Makes sense to me (and once support for PHP 8.4 property hooks gets added, those should probably also be checked).

Note: checking closures declared via arrow functions probably doesn't make sense as those can't contain more than one statement.

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

No branches or pull requests

2 participants