| Conditions | 3 |
| Paths | 4 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 72 | 5 | public static function fromArray(array $data) |
|
| 73 | { |
||
| 74 | 5 | if (isset($data['created_at'])) { |
|
| 75 | 1 | $data['created_at'] = new \DateTimeImmutable($data['created_at']); |
|
| 76 | } |
||
| 77 | 5 | if (isset($data['updated_at'])) { |
|
| 78 | 1 | $data['updated_at'] = new \DateTimeImmutable($data['updated_at']); |
|
| 79 | } |
||
| 80 | |||
| 81 | 5 | return self::fromArrayTrait($data); |
|
| 82 | } |
||
| 84 |