Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Extension\AbuseFilter\Hooks; |
| 4 | |
| 5 | use MediaWiki\Extension\AbuseFilter\Variables\VariableHolder; |
| 6 | use MediaWiki\Title\Title; |
| 7 | use MediaWiki\User\User; |
| 8 | |
| 9 | interface AbuseFilterShouldFilterActionHook { |
| 10 | /** |
| 11 | * Hook runner for the `AbuseFilterShouldFilterAction` hook |
| 12 | * |
| 13 | * Called before filtering an action. If the current action should not be filtered, |
| 14 | * return false and add a useful reason to $skipReasons. |
| 15 | * |
| 16 | * @param VariableHolder $vars |
| 17 | * @param Title $title Title object target of the action |
| 18 | * @param User $user User object performer of the action |
| 19 | * @param array &$skipReasons Array of reasons why the action should be skipped |
| 20 | * @return bool|void True or no return value to continue or false to abort |
| 21 | */ |
| 22 | public function onAbuseFilterShouldFilterAction( |
| 23 | VariableHolder $vars, |
| 24 | Title $title, |
| 25 | User $user, |
| 26 | array &$skipReasons |
| 27 | ); |
| 28 | } |