PHP code example of symfony-tools / code-block-checker
1. Go to this page and download the library: Download symfony-tools/code-block-checker 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/ */
symfony-tools / code-block-checker example snippets
terminal
$ php ./code-block-checker.php verify:docs /path/to/docs cache.rst controller.rst --env=dev
::error file=cache,line=377::[Invalid syntax] PHP Parse error: syntax error, unexpected token "}"
[ERROR] Build completed with 1 errors
$ php ./code-block-checker.php verify:docs /path/to/docs cache.rst controller.rst --env=dev --generate-baseline=baseline.json
$ php ./code-block-checker.php verify:docs /path/to/docs cache.rst controller.rst --env=dev --baseline=baseline.json
[OK] Build completed successfully!