PHP_CodeSniffer
PHP_CodeSniffer copied to clipboard
Generic/CyclomaticComplexity: support anonymous functions
Is your feature request related to a problem?
While working on #684, I noticed that the sniff Generic.Metrics.CyclomaticComplexity doesn't check the cyclomatic complexity of anonymous functions, and I believe it should. That being said, I'm not too familiar with the concept of cyclomatic complexity, and I could be missing something.
- [x] I have read the Contribution Guidelines and this is not a support question.
- [ ] I intend to create a pull request to implement this feature.
Loosely related to #726. I think these two issues should probably be researched together and verified against an official definition for Cyclomatic Complexity (and possibly against some interpretations from other tools).