Cyclomatic Complexity Violation: Function should have complexity 10 or less: currently complexity equals 13 (cyclomatic_complexity)

The method is too complex. But instead of rewriting the code, you could exclude switches from the cyclomatic_complexity calculation (since they are perfectly readable) like this:

cyclomatic_complexity:
  ignores_case_statements: true

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)