| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 26 | public function persist(Snapshot $snapshot): void |
||
| 27 | { |
||
| 28 | $this->connection |
||
| 29 | ->table($this->table) |
||
| 30 | ->insert([ |
||
| 31 | 'aggregate_root_id' => $snapshot->aggregateRootId()->toString(), |
||
| 32 | 'aggregate_root_version' => $snapshot->aggregateRootVersion(), |
||
| 33 | 'state' => json_encode($snapshot->state()), |
||
| 34 | 'recorded_at' => Carbon::now()->toDateTimeString(), |
||
| 35 | ]); |
||
| 56 |