Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | class Staff |
||
7 | { |
||
8 | private string $id; |
||
9 | private string $name; |
||
10 | private ?string $membershipNumber; |
||
11 | private ?string $position; |
||
12 | |||
13 | public static function createFromResponse(\stdClass $response): self |
||
14 | { |
||
15 | $staff = new self(); |
||
16 | |||
17 | $staff->id = $response->relGuid; |
||
18 | $staff->name = $response->naam; |
||
19 | $staff->membershipNumber = $response->lidNr; |
||
20 | $staff->position = $response->tvCaC; |
||
21 | |||
22 | return $staff; |
||
23 | } |
||
24 | |||
25 | public function getId(): string |
||
26 | { |
||
27 | return $this->id; |
||
28 | } |
||
29 | |||
30 | public function getName(): string |
||
31 | { |
||
32 | return $this->name; |
||
33 | } |
||
34 | |||
35 | public function getMembershipNumber(): ?string |
||
36 | { |
||
37 | return $this->membershipNumber; |
||
38 | } |
||
39 | |||
40 | public function getPosition(): ?string |
||
43 | } |
||
44 | } |
||
45 |