Total Complexity | 7 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | class Group |
||
7 | { |
||
8 | private string $id; |
||
9 | private string $name; |
||
10 | private ?string $category; |
||
11 | private ?string $region; |
||
12 | private ?string $regionId; |
||
13 | private GroupTeamCollection $teams; |
||
14 | |||
15 | public static function createFromResponse(\stdClass $response): self |
||
16 | { |
||
17 | $group = new self(); |
||
18 | |||
19 | $group->id = $response->guid; |
||
20 | $group->name = $response->naam; |
||
21 | $group->category = $response->categorie; |
||
22 | $group->region = $response->regioNaam; |
||
23 | $group->regionId = $response->regioGUID; |
||
24 | $group->teams = GroupTeamCollection::createFromArrayResponse($response->teams); |
||
25 | |||
26 | return $group; |
||
27 | } |
||
28 | |||
29 | public function getId(): string |
||
30 | { |
||
31 | return $this->id; |
||
32 | } |
||
33 | |||
34 | public function getName(): string |
||
37 | } |
||
38 | |||
39 | public function getCategory(): ?string |
||
40 | { |
||
41 | return $this->category; |
||
42 | } |
||
43 | |||
44 | public function getRegion(): ?string |
||
47 | } |
||
48 | |||
49 | public function getRegionId(): ?string |
||
50 | { |
||
51 | return $this->regionId; |
||
52 | } |
||
53 | |||
54 | public function getTeams(): GroupTeamCollection |
||
57 | } |
||
58 | } |
||
59 |