| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function retrieve(string $aggregateUuid): ?Snapshot |
||
| 24 | { |
||
| 25 | /** @var \Illuminate\Database\Query\Builder $query */ |
||
| 26 | $query = $this->snapshotModel::query(); |
||
| 27 | |||
| 28 | if ($snapshot = $query->latest()->uuid($aggregateUuid)->first()) { |
||
| 29 | return $snapshot->toSnapshot(); |
||
| 30 | } |
||
| 31 | |||
| 32 | return null; |
||
| 33 | } |
||
| 34 | |||
| 49 |