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!";
}
}
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:
Please refer to the following link to fix similar issues. https://app.codacy.com/app/BSravanthi/pattern-recognition-iiith/issues?&filters=W3siaWQiOiJMYW5ndWFnZSIsInZhbHVlcyI6W251bGxdfSx7ImlkIjoiQ2F0ZWdvcnkiLCJ2YWx1ZXMiOlsiQ29kZSBTdHlsZSJdfSx7ImlkIjoiTGV2ZWwiLCJ2YWx1ZXMiOltudWxsXX0seyJpZCI6IlBhdHRlcm4iLCJ2YWx1ZXMiOlsxMzFdfSx7ImlkIjoiQXV0aG9yIiwidmFsdWVzIjpbbnVsbF19LHsidmFsdWVzIjpbXX1d