Pattern: Cognitive complexity is too high
Issue: -
Cognitive complexity is a measure of how hard code is to understand. While cyclomatic complexity is good to measure "testability" of the code, cognitive complexity aims to provide a more precise measure of the difficulty of understanding the code. Enforcing a maximum complexity per function helps to keep code readable and maintainable.
(int) the maximum function complexity
[rule.cognitive-complexity]
arguments =[7]