Refactoring method getCyclomaticComplexity in the class ClassMetrcsCalculator