virtual-labs-archive / pattern-recognition-iiith

Other
4 stars 245 forks source link

The method outertext() has a Cyclomatic Complexity of 17. The configured cyclomatic complexity threshold is 10. #72

Open BSravanthi opened 5 years ago

BSravanthi commented 5 years ago

Cyclomatic complexity is determined by the number of decision points in a method plus one for the method entry. The following keywords create new decision points: 'if', 'while', 'for', and 'case labels'. For example, this code has a cyclomatic complexity level of 2:

function foo()
{
    $t=date("H");
    if ($t<"20")
    {
        echo "Have a good day!";
    }
}

Please refer to the following link to fix similar issues. https://app.codacy.com/app/BSravanthi/pattern-recognition-iiith/issues?&filters=W3siaWQiOiJMYW5ndWFnZSIsInZhbHVlcyI6W251bGxdfSx7ImlkIjoiQ2F0ZWdvcnkiLCJ2YWx1ZXMiOlsiQ29kZSBTdHlsZSJdfSx7ImlkIjoiTGV2ZWwiLCJ2YWx1ZXMiOltudWxsXX0seyJpZCI6IlBhdHRlcm4iLCJ2YWx1ZXMiOlsxMzFdfSx7ImlkIjoiQXV0aG9yIiwidmFsdWVzIjpbbnVsbF19LHsidmFsdWVzIjpbXX1d