| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Extension\AbuseFilter\Hooks; |
| 4 | |
| 5 | // phpcs:ignore MediaWiki.Classes.UnusedUseStatement.UnusedUse |
| 6 | use MediaWiki\Extension\AbuseFilter\Consequences\Consequence\Consequence; |
| 7 | // phpcs:ignore MediaWiki.Classes.UnusedUseStatement.UnusedUse |
| 8 | use MediaWiki\Extension\AbuseFilter\Consequences\Parameters; |
| 9 | |
| 10 | interface AbuseFilterCustomActionsHook { |
| 11 | /** |
| 12 | * Hook runner for the `AbuseFilterCustomActions` hook |
| 13 | * |
| 14 | * Allows specifying custom actions. Callers should append to $actions, using the action name as (string) key, |
| 15 | * and the value should be a callable with the signature documented below. |
| 16 | * |
| 17 | * @param callable[] &$actions |
| 18 | * @phan-param array<string,callable(Parameters,array):Consequence> &$actions |
| 19 | */ |
| 20 | public function onAbuseFilterCustomActions( array &$actions ); |
| 21 | } |