Achievement   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 27
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 2
1
<?php
2
3
namespace Syntax\SteamApi\Containers;
4
5
class Achievement
6
{
7
    public $apiName;
8
9
    public $achieved;
10
11
    public $name;
12
13
    public $description;
14
15
    public $icon;
16
17
    public $iconGray;
18
19
    public $unlockTimestamp;
20
21 1
    public function __construct($achievement)
22
    {
23 1
        $this->apiName         = (string) $achievement->apiname;
24 1
        $this->achieved        = (int)(string) $achievement['closed'];
25 1
        $this->name            = (string) $achievement->name;
26 1
        $this->description     = (string) $achievement->description;
27 1
        $this->icon            = (string) $achievement->iconClosed;
28 1
        $this->iconGray        = (string) $achievement->iconOpen;
29 1
        $this->unlockTimestamp = isset($achievement->unlockTimestamp) ? (int)(string) $achievement->unlockTimestamp : null;
30 1
    }
31
}
32