Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
91.67% covered (success)
91.67%
11 / 12
85.71% covered (warning)
85.71%
6 / 7
CRAP
0.00% covered (danger)
0.00%
0 / 1
Admin
91.67% covered (success)
91.67%
11 / 12
85.71% covered (warning)
85.71%
6 / 7
7.03
0.00% covered (danger)
0.00%
0 / 1
 __construct
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
1 / 1
1
 getId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getName
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getEmail
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 isSuperadmin
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getToken
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 isPwSetByAdmin
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3/** @noinspection PhpUnhandledExceptionInspection */
4declare(strict_types=1);
5
6class Admin extends DataCollectionTypeSafe {
7
8  private int $id;
9  private string $name;
10  private string $email;
11  private bool $isSuperadmin;
12  private bool $pwSetByAdmin;
13  private string $token;
14
15  function __construct(
16    int $id,
17    string $name,
18    string $email,
19    bool $isSuperadmin,
20    string $token,
21    bool $pwSetByAdmin = false
22  ) {
23
24    $this->id = $id;
25    $this->name = $name;
26    $this->email = $email;
27    $this->isSuperadmin = $isSuperadmin;
28    $this->token = $token;
29    $this->pwSetByAdmin = $pwSetByAdmin;
30  }
31
32
33  public function getId(): int {
34
35    return $this->id;
36  }
37
38
39  public function getName(): string {
40
41    return $this->name;
42  }
43
44
45  public function getEmail(): string {
46
47    return $this->email;
48  }
49
50
51  public function isSuperadmin(): bool {
52
53    return $this->isSuperadmin;
54  }
55
56
57  public function getToken(): string {
58
59    return $this->token;
60  }
61
62  public function isPwSetByAdmin(): bool {
63    return $this->pwSetByAdmin;
64  }
65}