PHP_CodeSniffer icon indicating copy to clipboard operation
PHP_CodeSniffer copied to clipboard

Generic/CyclomaticComplexity: support anonymous functions

Open rodrigoprimo opened this issue 1 year ago • 1 comments

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.

rodrigoprimo avatar Nov 27 '24 18:11 rodrigoprimo

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).

jrfnl avatar Nov 27 '24 20:11 jrfnl