Lines 0.00% 0 / 2
Methods 0.00% 0 / 2
Classes 0.00% 0 / 1
Name Lines Methods CRAP
 __construct 0.00% 0 / 1 0.00% 0 / 1 2
 toStateChange 0.00% 0 / 1 0.00% 0 / 1 2
15final readonly class StateUpdate
16{
17    public function __construct(
18        public EntityId $entityId,
19        public ?EntityState $to,
20        public ?Instant $firedAt = null,
21        public ?EventContext $context = null,
22        public StateChangeOrigin $origin = StateChangeOrigin::Live,
23    ) {}
24
25    public function toStateChange(?EntityState $from): StateChange
26    {
27        return new StateChange($this->entityId, $from, $this->to, $this->firedAt, $this->context, $this->origin);
28    }
29}