1. Go to this page and download the library: Download andreapollastri/checkpoint 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/ */
use Checkpoint\Checks\AbstractCheck;
use Checkpoint\Checks\CheckResult;
class MyCustomCheck extends AbstractCheck
{
public function name(): string
{
return 'My Custom Check';
}
public function run(): CheckResult
{
// your logic here
return CheckResult::pass('Everything looks good.');
// or: CheckResult::warn('Something to review.', ['detail one', 'detail two']);
// or: CheckResult::fail('Critical issue found.', ['detail']);
}
}
use Checkpoint\Scanner;
$scanner = Scanner::withDefaultChecks(base_path())
->add(new MyCustomCheck());