| Conditions | 3 |
| Paths | 4 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 81 | 5 | public static function fromArray(array $data) |
|
| 82 | { |
||
| 83 | 5 | if (isset($data['created_at'])) { |
|
| 84 | 1 | $data['created_at'] = new \DateTimeImmutable($data['created_at']); |
|
| 85 | } |
||
| 86 | 5 | if (isset($data['updated_at'])) { |
|
| 87 | 1 | $data['updated_at'] = new \DateTimeImmutable($data['updated_at']); |
|
| 88 | } |
||
| 89 | |||
| 90 | 5 | return self::fromArrayTrait($data); |
|
| 91 | } |
||
| 93 |