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

TexturesProperty   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 6
c 0
b 0
f 0
dl 0
loc 18
ccs 8
cts 8
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getTextures() 0 2 1
A __construct() 0 3 1
A getSignature() 0 2 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Ely\Mojang\Response\Properties;
5
6
class TexturesProperty extends Property {
7
8
    /**
9
     * @var string|null
10
     */
11
    private $signature;
12
13 3
    public function __construct(array $prop) {
14 3
        parent::__construct($prop);
15 3
        $this->signature = $prop['signature'] ?? null;
16 3
    }
17
18 2
    public function getTextures(): TexturesPropertyValue {
19 2
        return TexturesPropertyValue::createFromRawTextures($this->value);
20
    }
21
22 2
    public function getSignature(): ?string {
23 2
        return $this->signature;
24
    }
25
26
}
27