Lines
66.66%
2 / 3
Methods
66.66%
2 / 3
Classes
0.00%
0 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| getActionName | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| listTargetedEntityIds | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 6 | ||
| 10 | final readonly class RecordedActionCall | |
| 11 | { | |
| 12 | /** @param array<string, mixed> $data */ | |
| 13 | public function __construct( | |
| 14 | public string $domain, | |
| 15 | public string $action, | |
| 16 | public array $data, | |
| 17 | public ?ActionTarget $target, | |
| 18 | public bool $returnsResponse, | |
| 19 | public EventContext $context, | |
| 20 | ) {} | |
| 21 | ||
| 22 | public function getActionName(): string | |
| 23 | { | |
| 24 | return $this->domain . '.' . $this->action; | |
| 25 | } | |
| 26 | ||
| 27 | /** @return list<string> */ | |
| 28 | public function listTargetedEntityIds(): array | |
| 29 | { | |
| 30 | return $this->target === null ? [] : array_map(strval(...), $this->target->entityIds); | |
| 31 | } | |
| 32 | } |