phpcs-cognitive-complexity
phpcs-cognitive-complexity copied to clipboard
Cognitive Complexity implementation for PHP_CodeSniffer
1. opening a match construct increases nesting level 2. re-enable github runner to pick up test jobs by using a supported platform
Hi there, Could you please create a new tag for the latest master version?
refactor MaximumComplexity Sniff & Analyzer.php to utilize "$phpcsfile" and how nesting level increment is calculated fixes #2 and #3 but SniffTest fails
Extracted from #1 > Sniff code: > - `$method:` you are presuming a code style. Best practice sniffs should be code style agnostic. > While not very common, this will...
sniff calculates this to be 7 codeclimate.com calculates it to be 5 (I think) I think it should be 6 ?? ```PHP public function doWhile() { if (true) { //...
I don't know what this method's cognitive-complexity should be, but I know it shouldn't be 11 ```PHP public function foo() { $blah = array(); for ($i = 0, $count =...