ClubTeam::getShirtColor()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Eekes\VblApi\Entity;
5
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
37
    {
38
        return $this->name;
39
    }
40
41
    public function getCategory(): ?string
42
    {
43
        return $this->category;
44
    }
45
46
    public function getClubId(): ?string
47
    {
48
        return $this->clubId;
49
    }
50
51
    public function getShirtColor(): ?string
52
    {
53
        return $this->shirtColor;
54
    }
55
56
    public function getShirtReserveColor(): ?string
57
    {
58
        return $this->shirtReserveColor;
59
    }
60
61
    public function getGroups(): ClubTeamGroupCollection
62
    {
63
        return $this->groups;
64
    }
65
}