AuthenticationResponseUserField::getProperties()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace Ely\Mojang\Response;
5
6
use Ely\Mojang\Response\Properties\Factory;
7
8
class AuthenticationResponseUserField {
9
10
    private $id;
11
12
    private $rawProperties;
13
14 2
    public function __construct(string $id, array $rawProperties) {
15 2
        $this->id = $id;
16 2
        $this->rawProperties = $rawProperties;
17 2
    }
18
19 2
    public function getId(): string {
20 2
        return $this->id;
21
    }
22
23
    /**
24
     * @return \Ely\Mojang\Response\Properties\Property[]
25
     */
26 2
    public function getProperties(): array {
27 2
        return array_map([Factory::class, 'createFromProp'], $this->rawProperties);
28
    }
29
30
}
31