PHP code example of jordikroon / docbook-cs
1. Go to this page and download the library: Download jordikroon/docbook-cs 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/ */
jordikroon / docbook-cs example snippets
namespace Acme\DocbookSniffs;
use DocbookCS\Sniff\AbstractSniff;
use DocbookCS\Source\File;
final class MySniff extends AbstractSniff
{
public static function getCode(): string
{
return 'Acme.MySniff';
}
public function process(\DOMDocument $document, File $file): array
{
$violations = [];
// ... inspect $document, add violations via $this->createViolation(...)
return $violations;
}
}