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 | ||
| 14 | final readonly class TurnInQuestCommand implements Command | |
| 15 | { | |
| 16 | public function __construct( | |
| 17 | private AreaId $area, | |
| 18 | private QuestId $quest, | |
| 19 | private ?ItemId $chosenReward = null, | |
| 20 | private Quantity $times = new Quantity(1), | |
| 21 | ) {} | |
| 22 | ||
| 23 | #[Override] | |
| 24 | public function toMessage(): string | |
| 25 | { | |
| 26 | $reward = $this->chosenReward->value ?? -1; | |
| 27 | ||
| 28 | return "%xt%zm%tryQuestComplete%{$this->area}%{$this->quest->value}%{$reward}%false%{$this->times->value}%wvz%"; | |
| 29 | } | |
| 30 | } |