Lines 0.00% 0 / 3
Functions and Methods 0.00% 0 / 3
Classes and Traits 0.00% 0 / 1
Name Lines Functions and Methods CRAP Classes and Traits
HistoryResult 0.00% 0 / 3 0.00% 0 / 3 12 0.00% 0 / 1
 __construct 0.00% 0 / 1 0.00% 0 / 1 2
 getAnswer 0.00% 0 / 1 0.00% 0 / 1 2
 getOutboxDelivery 0.00% 0 / 1 0.00% 0 / 1 2
1<?php
2
3declare(strict_types=1);
4
5namespace Stewart\Runtime\Ipc\Message;
6
7use Stewart\Contracts\History\Collection\HistoricalStateCollection;
8use Stewart\Runtime\Ipc\Wire\HistoricalStatesFragment;
9use Stewart\Runtime\Model\CorrelationId;
10
11#[IpcMessage(tag: 'history_result')]
12final readonly class HistoryResult implements CorrelatedReply
13{
14    public function __construct(
15        public CorrelationId $correlationId,
16        public HistoricalStatesFragment $states,
17    ) {}
18
19    public function getAnswer(): HistoricalStateCollection
20    {
21        return $this->states->collection;
22    }
23
24    public function getOutboxDelivery(): OutboxDelivery
25    {
26        return OutboxDelivery::Plain;
27    }
28}