PHP code example of silverstripe / moduleratings

1. Go to this page and download the library: Download silverstripe/moduleratings 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/ */

    

silverstripe / moduleratings example snippets


$checkSuite = new \SilverStripe\ModuleRatings\CheckSuite();

$checkSuite
    ->setModuleRoot('/path/to/silverstripe/framework')
    ->setRepositorySlug('silverstripe/silverstripe-framework');

$checkSuite->run();

echo 'Framework has scored ' . $checkSuite->getScore() . ' out of 100 points. Details:', PHP_EOL;
print_r($checkSuite->getCheckDetails());