Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
9 / 9 |
|
100.00% |
7 / 7 |
CRAP | |
100.00% |
1 / 1 |
LastEditInfo | |
100.00% |
9 / 9 |
|
100.00% |
7 / 7 |
7 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 | |||
getUserID | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setUserID | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getUserName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setUserName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getTimestamp | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setTimestamp | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\AbuseFilter\Filter; |
4 | |
5 | /** |
6 | * (Mutable) value object that holds information about the last edit to a filter. |
7 | */ |
8 | class LastEditInfo { |
9 | /** @var int */ |
10 | private $userID; |
11 | /** @var string */ |
12 | private $userName; |
13 | /** @var string */ |
14 | private $timestamp; |
15 | |
16 | /** |
17 | * @param int $userID |
18 | * @param string $userName |
19 | * @param string $timestamp |
20 | */ |
21 | public function __construct( int $userID, string $userName, string $timestamp ) { |
22 | $this->userID = $userID; |
23 | $this->userName = $userName; |
24 | $this->timestamp = $timestamp; |
25 | } |
26 | |
27 | /** |
28 | * @return int |
29 | */ |
30 | public function getUserID(): int { |
31 | return $this->userID; |
32 | } |
33 | |
34 | /** |
35 | * @param int $id |
36 | */ |
37 | public function setUserID( int $id ): void { |
38 | $this->userID = $id; |
39 | } |
40 | |
41 | /** |
42 | * @return string |
43 | */ |
44 | public function getUserName(): string { |
45 | return $this->userName; |
46 | } |
47 | |
48 | /** |
49 | * @param string $name |
50 | */ |
51 | public function setUserName( string $name ): void { |
52 | $this->userName = $name; |
53 | } |
54 | |
55 | /** |
56 | * @return string |
57 | */ |
58 | public function getTimestamp(): string { |
59 | return $this->timestamp; |
60 | } |
61 | |
62 | /** |
63 | * @param string $timestamp |
64 | */ |
65 | public function setTimestamp( string $timestamp ): void { |
66 | $this->timestamp = $timestamp; |
67 | } |
68 | } |