PHP code example of ohdearapp / health-check-results
1. Go to this page and download the library: Download ohdearapp/health-check-results 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/ */
ohdearapp / health-check-results example snippets
$checkResults = new CheckResults(DateTime::createFromFormat('Y-m-d H:i:s', '2021-01-01 00:00:00'));
$checkResult = new CheckResult(
name: 'UsedDiskSpace',
label: 'Used disk space',
notificationMessage: 'Your disk is almost full (91%)',
shortSummary: '91%',
status: CheckResult::STATUS_FAILED,
meta: ['used_disk_space_percentage' => 91]
);
$checkResults->addCheckResult($checkResult);