1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

update documentation about authoring plugins (#5958)

This commit is contained in:
orklah 2021-06-20 20:12:07 +02:00 committed by GitHub
parent d4311e3086
commit df42172f8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,16 +58,16 @@ Composer-based plugin is a composer package which conforms to these requirements
### Psalm API
Plugins may implement one of (or more than one of) `Psalm\Plugin\Hook\*` interface(s).
Plugins may implement one of (or more than one of) `Psalm\Plugin\EventHandler\*` interface(s).
```php
<?php
class SomePlugin implements \Psalm\Plugin\Hook\AfterStatementAnalysisInterface
class SomePlugin implements \Psalm\Plugin\EventHandler\AfterStatementAnalysisInterface
{
}
```
`Psalm\Plugin\Hook\*` offers the following interfaces that you can implement:
`Psalm\Plugin\EventHandler\*` offers the following interfaces that you can implement:
- `AfterAnalysisInterface` - called after Psalm has completed its analysis. Use this hook if you want to do something with the analysis results.
- `AfterClassLikeAnalysisInterface` - called after Psalm has completed its analysis of a given class.