Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | public function __construct(object $insight) |
||
30 | { |
||
31 | $this->uuid = $insight->uuid; |
||
32 | $this->label = $insight->label; |
||
33 | $this->hostname = $insight->hostname; |
||
34 | $this->status = $insight->status; |
||
35 | $this->updatedAt = $insight->updated_at; |
||
36 | $this->lastConnectedAt = $insight->last_connected_at; |
||
37 | $this->scores = $insight->scores; |
||
38 | $this->flags = $insight->flags; |
||
39 | $this->links = $insight->_links; |
||
40 | |||
41 | $scores = new stdClass(); |
||
42 | foreach ($insight->counts as $name => $counts) { |
||
43 | $scores->$name = new InsightCountResponse($name, $counts); |
||
44 | } |
||
45 | $this->counts = $scores; |
||
46 | } |
||
48 |