Passed
Push — master ( bbc85b...f0bc06 )
by
04:59
created

MinecraftServicesProfileResponse   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 55
ccs 14
cts 14
cp 1
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getCapes() 0 2 1
A getSkins() 0 2 1
A getName() 0 2 1
A __construct() 0 5 1
A getId() 0 2 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Ely\Mojang\Response;
5
6
/**
7
 * @see https://wiki.vg/Mojang_API#Profile_Information
8
 */
9
class MinecraftServicesProfileResponse {
10
11
    /**
12
     * @var string
13
     */
14
    private $id;
15
16
    /**
17
     * @var string
18
     */
19
    private $name;
20
21
    /**
22
     * @var MinecraftServicesProfileSkin[]
23
     */
24
    private $skins;
25
26
    /**
27
     * @var MinecraftServicesProfileCape[]
28
     */
29
    private $capes;
30
31
    /**
32
     * @param string $id
33
     * @param string $name
34
     * @param MinecraftServicesProfileSkin[] $skins
35
     * @param MinecraftServicesProfileCape[] $capes
36
     */
37 1
    public function __construct(string $id, string $name, array $skins, array $capes) {
38 1
        $this->id = $id;
39 1
        $this->name = $name;
40 1
        $this->skins = $skins;
41 1
        $this->capes = $capes;
42 1
    }
43
44 1
    public function getId(): string {
45 1
        return $this->id;
46
    }
47
48 1
    public function getName(): string {
49 1
        return $this->name;
50
    }
51
52
    /**
53
     * @return MinecraftServicesProfileSkin[]
54
     */
55 1
    public function getSkins(): array {
56 1
        return $this->skins;
57
    }
58
59
    /**
60
     * @return MinecraftServicesProfileCape[]
61
     */
62 1
    public function getCapes(): array {
63 1
        return $this->capes;
64
    }
65
66
}
67