PHP code example of bronek / code-complexity

1. Go to this page and download the library: Download bronek/code-complexity library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bronek / code-complexity example snippets




$calculator = new \Bronek\CodeComplexity\CodeComplexityCalculator();
$complexityScore = $calculator->calculate(file_get_contents('file.php'));

echo "Code Complexity of file file.php is $complexityScore"