Why is this an issue?

Cognitive Complexity is a measure of how hard the control flow of a routine is to understand. This can be caused by excessive use of:

Routines with high Cognitive Complexity will be difficult to maintain, as a very non-linear control flow is difficult to follow.

How to fix it

Refactor the method to use less loops, conditionals, or recursion.

Resources