Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
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 |