Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
ExistingEventRegistration | |
0.00% |
0 / 4 |
|
0.00% |
0 / 4 |
20 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getID | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getCreationTimestamp | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getLastEditTimestamp | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | declare( strict_types=1 ); |
4 | |
5 | namespace MediaWiki\Extension\CampaignEvents\Event; |
6 | |
7 | use DateTimeZone; |
8 | use MediaWiki\Extension\CampaignEvents\MWEntity\ICampaignsPage; |
9 | use MediaWiki\Extension\CampaignEvents\TrackingTool\TrackingToolAssociation; |
10 | |
11 | /** |
12 | * Immutable value object that represents a registration that exists in the database. |
13 | */ |
14 | class ExistingEventRegistration extends EventRegistration { |
15 | /** |
16 | * Same as the parent, but ID, creation timestamp and last edit timestamp are not nullable. |
17 | * |
18 | * @param int $id |
19 | * @param string $name |
20 | * @param ICampaignsPage $page |
21 | * @param string|null $chatURL |
22 | * @param string[]|true $wikis |
23 | * @param string[] $topics |
24 | * @param TrackingToolAssociation[] $trackingTools |
25 | * @phan-param list<TrackingToolAssociation> $trackingTools |
26 | * @param string $status |
27 | * @param DateTimeZone $timezone |
28 | * @param string $startLocalTimestamp TS_MW timestamp |
29 | * @param string $endLocalTimestamp TS_MW timestamp |
30 | * @param string $type |
31 | * @param int $meetingType |
32 | * @param string|null $meetingURL |
33 | * @param string|null $meetingCountry |
34 | * @param string|null $meetingAddress |
35 | * @param int[] $participantQuestions |
36 | * @param string $creationTimestamp UNIX timestamp |
37 | * @param string $lastEditTimestamp UNIX timestamp |
38 | * @param string|null $deletionTimestamp UNIX timestamp |
39 | */ |
40 | public function __construct( |
41 | int $id, |
42 | string $name, |
43 | ICampaignsPage $page, |
44 | ?string $chatURL, |
45 | $wikis, |
46 | array $topics, |
47 | array $trackingTools, |
48 | string $status, |
49 | DateTimeZone $timezone, |
50 | string $startLocalTimestamp, |
51 | string $endLocalTimestamp, |
52 | string $type, |
53 | int $meetingType, |
54 | ?string $meetingURL, |
55 | ?string $meetingCountry, |
56 | ?string $meetingAddress, |
57 | array $participantQuestions, |
58 | string $creationTimestamp, |
59 | string $lastEditTimestamp, |
60 | ?string $deletionTimestamp |
61 | ) { |
62 | // @phan-suppress-next-line PhanParamTooFewUnpack |
63 | parent::__construct( ...func_get_args() ); |
64 | } |
65 | |
66 | /** |
67 | * @return int |
68 | */ |
69 | public function getID(): int { |
70 | // @phan-suppress-next-line PhanTypeMismatchReturnNullable |
71 | return parent::getID(); |
72 | } |
73 | |
74 | /** |
75 | * @return string |
76 | */ |
77 | public function getCreationTimestamp(): string { |
78 | // @phan-suppress-next-line PhanTypeMismatchReturnNullable |
79 | return parent::getCreationTimestamp(); |
80 | } |
81 | |
82 | /** |
83 | * @return string |
84 | */ |
85 | public function getLastEditTimestamp(): string { |
86 | // @phan-suppress-next-line PhanTypeMismatchReturnNullable |
87 | return parent::getLastEditTimestamp(); |
88 | } |
89 | } |