| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 16 | 
| Code Lines | 11 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 12 | 
| CRAP Score | 1 | 
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1);  | 
            ||
| 28 | 1 | public function __construct(array $data)  | 
            |
| 29 |     { | 
            ||
| 30 | 1 | Assert::that($data)  | 
            |
| 31 | 1 |             ->isArray()->keyExists('sendtime') | 
            |
| 32 | 1 |             ->keyExists('buffered') | 
            |
| 33 | 1 |             ->keyExists('received') | 
            |
| 34 | 1 |             ->keyExists('rejected') | 
            |
| 35 | ;  | 
            ||
| 36 | |||
| 37 | 1 |         $this->sendTime = \DateTimeImmutable::createFromFormat('d-m-Y H:i:s', $data['sendtime']); | 
            |
| 38 | 1 | Assert::that($this->sendTime)->isInstanceOf(\DateTimeImmutable::class, '`sendtime` does not have the correct format. Value given: '.$data['sendtime']);  | 
            |
| 39 | |||
| 40 | 1 | $this->buffered = (int)$data['buffered'];  | 
            |
| 41 | 1 | $this->received = (int)$data['received'];  | 
            |
| 42 | 1 | $this->rejected = (int)$data['rejected'];  | 
            |
| 43 | 1 | }  | 
            |
| 44 | |||
| 77 |