Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 5 |
CRAP | |
0.00% |
0 / 1 |
Organizer | |
0.00% |
0 / 8 |
|
0.00% |
0 / 5 |
30 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
getUser | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getRoles | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getOrganizerID | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getClickwrapAcceptance | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | declare( strict_types=1 ); |
4 | |
5 | namespace MediaWiki\Extension\CampaignEvents\Organizers; |
6 | |
7 | use MediaWiki\Extension\CampaignEvents\MWEntity\CentralUser; |
8 | |
9 | class Organizer { |
10 | private CentralUser $user; |
11 | /** @var string[] */ |
12 | private array $roles; |
13 | private int $organizerID; |
14 | private bool $clickwrapAcceptance; |
15 | |
16 | /** |
17 | * @param CentralUser $user |
18 | * @param string[] $roles List of Roles::ROLE_* constants |
19 | * @param int $organizerID Unique ID which identifies this specific organizer, for a specific event, in the DB. |
20 | * @param bool $clickwrapAcceptance boolean which indicates if the user has accepted the PII clickwrap agreement |
21 | */ |
22 | public function __construct( CentralUser $user, array $roles, int $organizerID, bool $clickwrapAcceptance ) { |
23 | $this->user = $user; |
24 | $this->roles = $roles; |
25 | $this->organizerID = $organizerID; |
26 | $this->clickwrapAcceptance = $clickwrapAcceptance; |
27 | } |
28 | |
29 | /** |
30 | * @return CentralUser |
31 | */ |
32 | public function getUser(): CentralUser { |
33 | return $this->user; |
34 | } |
35 | |
36 | /** |
37 | * @return string[] |
38 | */ |
39 | public function getRoles(): array { |
40 | return $this->roles; |
41 | } |
42 | |
43 | /** |
44 | * @return int |
45 | */ |
46 | public function getOrganizerID(): int { |
47 | return $this->organizerID; |
48 | } |
49 | |
50 | /** |
51 | * @return bool |
52 | */ |
53 | public function getClickwrapAcceptance(): bool { |
54 | return $this->clickwrapAcceptance; |
55 | } |
56 | } |