Cyclomatic Complexity

Cyclomatic complexity is a software metric of the complexity of a program.

This metric measure the number of decisions happening within the code. Those decisions are commands such as If/then, loops, or ternary operators.

<?php

    function foo() {
        if ($a) {

        } else {

        }
    }

?>

Documentation

See also Cyclomatic Complexity for PHP.

Related : Metrics, Cognitive Complexity, Complexity

Related packages : phpmetrics/phpmetrics