| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 82 | public static function fromRecord(array $row): Synchronization |
||
| 83 | { |
||
| 84 | $revision = $row[0]; |
||
| 85 | $blobId = $row[1]; |
||
| 86 | $time = \DateTime::createFromFormat('U', $row[2]); |
||
| 87 | $identity = $row[3] ?: null; |
||
| 88 | |||
| 89 | if (!($time instanceof \DateTime)) |
||
| 90 | { |
||
| 91 | throw new Exception(); |
||
| 92 | } |
||
| 93 | |||
| 94 | return new static($revision, $blobId, $time, $identity); |
||
| 95 | } |
||
| 96 | } |
||
| 97 |