|Synopsis:||Do not have overly complex functions|
If a function is too complex, it can be difficult to comprehend. The cyclomatic complexity of a function, i.e. the number of linearly independent paths through a function, should not exceed the agreed maximum. A function with a cyclomatic complexity less than 5 is considered to be ok. However, if its cyclomatic complexity is higher than 10, refactoring is recommended.