Lines 100.00% 3 / 3
Methods 100.00% 2 / 2
Classes 100.00% 1 / 1
Name Lines Methods CRAP
 __construct 100.00% 1 / 1 100.00% 1 / 1 1
 toMessage 100.00% 2 / 2 100.00% 1 / 1 1
12final readonly class LoadQuestCommand implements Command
13{
14    /** @var non-empty-list<QuestId> */
15    private array $questIds;
16
17    public function __construct(
18        private AreaId $areaId,
19        QuestId $questId,
20        QuestId ...$more,
21    ) {
22        $this->questIds = [$questId, ...array_values($more)];
23    }
24
25    #[Override]
26    public function toMessage(): string
27    {
28        $ids = implode('%', array_map(static fn(QuestId $id): string => (string) $id->value, $this->questIds));
29
30        return "%xt%zm%getQuests%{$this->areaId}%{$ids}%";
31    }
32}