Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 1
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3namespace MediaWiki\CheckUser\Hook;
4
5use MediaWiki\User\UserIdentity;
6use RecentChange;
7
8interface CheckUserInsertPrivateEventRowHook {
9    /**
10     * Use this hook to modify the IP, XFF or other values
11     * in the row to be inserted into cu_private_event.
12     *
13     * If changing the request IP or XFF stored in the database, you are
14     * required to modify $ip and $xff (instead of
15     * modifying $row) as CheckUser will calculate other
16     * values based on those parameters and not the values
17     * in $row.
18     *
19     * @since 1.40
20     *
21     * @param string &$ip The user's IP
22     * @param string|false &$xff The XFF for the request; false if no defined XFF
23     * @param array &$row The row to be inserted (before defaults are applied)
24     * @param UserIdentity $user The user who performed the action associated with this row
25     * @param ?RecentChange $rc If triggered by a RecentChange, then this is the associated
26     *  RecentChange object. Null if not triggered by a RecentChange.
27     * @codeCoverageIgnore Cannot be annotated as covered.
28     */
29    public function onCheckUserInsertPrivateEventRow(
30        string &$ip,
31        &$xff,
32        array &$row,
33        UserIdentity $user,
34        ?RecentChange $rc
35    );
36}
37
38/**
39 * Retain the old class name for backwards compatibility.
40 * @deprecated since 1.41
41 */
42class_alias( CheckUserInsertPrivateEventRowHook::class, 'MediaWiki\CheckUser\Hook\CheckUserInsertPrivateEventRow' );