| Total Complexity | 8 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | class ClubTeam |
||
| 7 | { |
||
| 8 | private string $id; |
||
| 9 | private ?string $name; |
||
| 10 | private ?string $category; |
||
| 11 | private ?string $clubId; |
||
| 12 | private ?string $shirtColor; |
||
| 13 | private ?string $shirtReserveColor; |
||
| 14 | private ClubTeamGroupCollection $groups; |
||
| 15 | |||
| 16 | public static function createFromResponse(\stdClass $response): self |
||
| 17 | { |
||
| 18 | $team = new self(); |
||
| 19 | |||
| 20 | $team->id = $response->guid; |
||
| 21 | $team->name = $response->naam; |
||
| 22 | $team->category = $response->categorie; |
||
| 23 | $team->clubId = $response->organisationGUID; |
||
| 24 | $team->shirtColor = $response->shirtKleur; |
||
| 25 | $team->shirtReserveColor = $response->shirtReserve; |
||
| 26 | $team->groups = ClubTeamGroupCollection::createFromArrayResponse($response->poules); |
||
| 27 | |||
| 28 | return $team; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function getId(): string |
||
| 32 | { |
||
| 33 | return $this->id; |
||
| 34 | } |
||
| 35 | |||
| 36 | public function getName(): ?string |
||
| 39 | } |
||
| 40 | |||
| 41 | public function getCategory(): ?string |
||
| 44 | } |
||
| 45 | |||
| 46 | public function getClubId(): ?string |
||
| 49 | } |
||
| 50 | |||
| 51 | public function getShirtColor(): ?string |
||
| 54 | } |
||
| 55 | |||
| 56 | public function getShirtReserveColor(): ?string |
||
| 57 | { |
||
| 58 | return $this->shirtReserveColor; |
||
| 59 | } |
||
| 60 | |||
| 61 | public function getGroups(): ClubTeamGroupCollection |
||
| 64 | } |
||
| 65 | } |