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