Skip to content

Commit

Permalink
Fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
arxeiss authored and grogy committed Aug 31, 2020
1 parent 4838574 commit 9f07b8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/syntax-error-callback.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 .`.<br>
The content should look like:

```php
Expand All @@ -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()
Expand Down

0 comments on commit 9f07b8b

Please sign in to comment.