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\RecentChanges\RecentChange; |
7 | use MediaWiki\User\UserIdentity; |
8 | |
9 | interface AbuseFilterGenerateAccountCreationVarsHook { |
10 | /** |
11 | * Hook runner for the `AbuseFilterGenerateAccountCreationVars` hook |
12 | * |
13 | * Allows altering the variables generated when in the context of account creation. |
14 | * |
15 | * @param VariableHolder $vars |
16 | * @param UserIdentity $creator The user who created the account (may be an IP address) |
17 | * @param UserIdentity $createdUser The account being created or autocreated |
18 | * @param bool $autocreate Whether the account creation is an autocreation. |
19 | * @param ?RecentChange $rc If the variables should be generated for an RC entry, |
20 | * this is the entry. Null if it's for the current action being filtered. |
21 | * @return bool|void True or no return value to continue or false to abort |
22 | */ |
23 | public function onAbuseFilterGenerateAccountCreationVars( |
24 | VariableHolder $vars, |
25 | UserIdentity $creator, |
26 | UserIdentity $createdUser, |
27 | bool $autocreate, |
28 | ?RecentChange $rc |
29 | ); |
30 | } |