| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 45 | public static function fromArray(array $structure) |
||
| 46 | { |
||
| 47 | $timezone = new DateTimeZone('UTC'); |
||
| 48 | |||
| 49 | $deviceServer = new static(); |
||
| 50 | $deviceServer->id = $structure['id']; |
||
| 51 | $deviceServer->created = new DateTimeImmutable($structure['created'], $timezone); |
||
| 52 | $deviceServer->updated = new DateTimeImmutable($structure['updated'], $timezone); |
||
| 53 | $deviceServer->ip = $structure['ip']; |
||
| 54 | $deviceServer->description = $structure['description']; |
||
| 55 | $deviceServer->status = $structure['status']; |
||
| 56 | return $deviceServer; |
||
| 57 | } |
||
| 58 | |||
| 107 |