| Conditions | 3 |
| Paths | 1 |
| Total Lines | 24 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 25 | public function handle() |
||
| 26 | { |
||
| 27 | $titles = ['Name', 'Up to date', 'Last processed event id', 'Last event processed at']; |
||
| 28 | |||
| 29 | $rows = $this->eventProjectionist->projectors |
||
| 30 | ->map(function ($eventHandler) { |
||
| 31 | if (is_string($eventHandler)) { |
||
| 32 | $eventHandler = app($eventHandler); |
||
| 33 | } |
||
| 34 | |||
| 35 | return $eventHandler; |
||
| 36 | }) |
||
| 37 | ->map(function (Projector $projector) { |
||
| 38 | return [ |
||
| 39 | $projector->getName(), |
||
| 40 | $projector->hasReceivedAllEvents() ? '✅' : '❌', |
||
| 41 | $projector->getLastProcessedEventId(), |
||
| 42 | $projector->lastEventProcessedAt()->format('Y-m-d H:i:s'), |
||
| 43 | ]; |
||
| 44 | }) |
||
| 45 | ->toArray(); |
||
| 46 | |||
| 47 | $this->table($titles, $rows); |
||
| 48 | } |
||
| 49 | } |
||
| 50 |