From 9f07b8b3d7ab8ef1d4e9864e94d0f5911f2b8014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Kut=C3=A1=C4=8D?= Date: Sun, 30 Aug 2020 11:24:05 +0200 Subject: [PATCH] Fix doc --- doc/syntax-error-callback.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/syntax-error-callback.md b/doc/syntax-error-callback.md index f35466e..955f5ef 100644 --- a/doc/syntax-error-callback.md +++ b/doc/syntax-error-callback.md @@ -4,9 +4,9 @@ 1. Create a class implementing `JakubOnderka\PhpParallelLint\Contracts\SyntaxErrorCallback` interface. File with the class must have the same name as the class inside. 1. Modify error before it is printed to the output. -## Configuration +## Example configuration -File `MyCustomErrorHandler.php` will be passed as an argument like `./parallel-lint --syntax-error-callback ./path/to/MyCustomErrorHandler.php .`. +File `MyCustomErrorHandler.php` will be passed as an argument like `./parallel-lint --syntax-error-callback ./path/to/MyCustomErrorHandler.php .`.
The content should look like: ```php @@ -21,7 +21,7 @@ class MyCustomErrorHandler implements SyntaxErrorCallback { */ public function errorFound(SyntaxError $error){ // Return new SyntaxError with custom modification to FilePath or Message - // Or return completely new SyntaxError extending the original one... + // Or return custom implementation of SyntaxError extending the original one... return new SyntaxError( $error->getFilePath(), $error->getMessage()