Lines
100.00%
2 / 2
Methods
100.00%
1 / 1
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 2 / 2 | 100.00% | 1 / 1 | 2 | ||
| 10 | final readonly class QuestDescription | |
| 11 | { | |
| 12 | /** @var non-empty-string */ | |
| 13 | public string $description; | |
| 14 | ||
| 15 | /** @var Option\Option<non-empty-string> */ | |
| 16 | public Option\Option $endText; | |
| 17 | ||
| 18 | public function __construct(string $description, string $endText = '') | |
| 19 | { | |
| 20 | $this->description = Type\non_empty_string()->assert($description); | |
| 21 | $this->endText = '' === $endText ? Option\none() : Option\some($endText); | |
| 22 | } | |
| 23 | } |