PHP code example of webagentur-yahya / golive-check

1. Go to this page and download the library: Download webagentur-yahya/golive-check 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/ */

    

webagentur-yahya / golive-check example snippets


final class MyCheck implements CheckInterface
{
    public function getIdentifier(): string { return 'myCheck'; }
    public function getCategory(): CheckCategory { return CheckCategory::Configuration; }
    public function getSeverity(): CheckSeverity { return CheckSeverity::Warning; }

    public function run(CheckContext $context): CheckResult
    {
        return $context->getSetting('my.setting') === ''
            ? CheckResult::failed('check.myCheck.fail', 'check.myCheck.solution')
            : CheckResult::ok('check.myCheck.ok');
    }
}