| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | 4 | public static function createFromArray(array $data) |
|
| 46 | { |
||
| 47 | 4 | $model = new self(); |
|
| 48 | 4 | $model->currentDeadline = isset($data['current_deadline']) ? new \DateTimeImmutable('@'.$data['current_deadline']) : null; |
|
| 49 | 4 | $model->currentlyDue = $data['currently_due']; |
|
| 50 | 4 | $model->disabledReason = $data['disabled_reason']; |
|
| 51 | 4 | $model->eventuallyDue = $data['eventually_due']; |
|
| 52 | 4 | $model->pastDue = $data['past_due']; |
|
| 53 | |||
| 54 | 4 | return $model; |
|
| 55 | } |
||
| 56 | |||
| 82 |