Lines 0.00% 0 / 2
Functions and Methods 0.00% 0 / 2
Classes and Traits 0.00% 0 / 1
Name Lines Functions and Methods CRAP Classes and Traits
RemoveExposedEntityRequest 0.00% 0 / 2 0.00% 0 / 2 6 0.00% 0 / 1
 __construct 0.00% 0 / 1 0.00% 0 / 1 2
 createUnreachableFailure 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\Exception\ExposureException;
8use Stewart\Contracts\Exposure\ExposedEntityKey;
9use Stewart\Runtime\Model\CorrelationId;
10use Stewart\Runtime\Model\ResourceScope;
11use Throwable;
12
13#[IpcMessage(tag: 'remove_exposed_entity_request')]
14final readonly class RemoveExposedEntityRequest implements WorkerMessage, HaCallRequest
15{
16    public function __construct(
17        public CorrelationId $correlationId,
18        public ResourceScope $scope,
19        public ExposedEntityKey $key,
20    ) {}
21
22    public function createUnreachableFailure(string $detail, ?Throwable $previous = null): ExposureException
23    {
24        return ExposureException::unreachable($this->key, $detail, $previous);
25    }
26}