| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function handle() |
||
| 17 | { |
||
| 18 | $snapshots = app(SnapshotRepository::class)->getAll(); |
||
| 19 | |||
| 20 | if ($snapshots->isEmpty()) { |
||
| 21 | $this->warn('No snapshots found. Run `snapshot:create` to create one.'); |
||
| 22 | |||
| 23 | return; |
||
| 24 | } |
||
| 25 | |||
| 26 | $rows = $snapshots->map(function (Snapshot $snapshot) { |
||
| 27 | return [ |
||
| 28 | $snapshot->name, |
||
| 29 | $snapshot->createdAt()->format('Y-m-d H:i:s'), |
||
| 30 | Format::humanReadableSize($snapshot->size()), |
||
| 31 | ]; |
||
| 32 | }); |
||
| 33 | |||
| 34 | $this->table(['Name', 'Created at', 'Size'], $rows); |
||
| 35 | } |
||
| 37 |