ClubTeamGroup::createFromResponse()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Eekes\VblApi\Entity;
5
6
class ClubTeamGroup
7
{
8
    private string $id;
9
    private string $name;
10
11
    public static function createFromResponse(\stdClass $response): self
12
    {
13
        $group = new self();
14
15
        $group->id = $response->guid;
16
        $group->name = $response->naam;
17
18
        return $group;
19
    }
20
21
    public function getId(): string
22
    {
23
        return $this->id;
24
    }
25
26
    public function getName(): string
27
    {
28
        return $this->name;
29
    }
30
}
31