Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| QuestDescription | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AqwSocketClient\Objects\Quest; |
| 6 | |
| 7 | use Psl\Type; |
| 8 | |
| 9 | final readonly class QuestDescription |
| 10 | { |
| 11 | public function __construct( |
| 12 | public readonly string $text, |
| 13 | public readonly ?string $completionText = null, |
| 14 | ) { |
| 15 | Type\non_empty_string()->assert($this->text); |
| 16 | |
| 17 | if ($this->completionText !== null) { |
| 18 | Type\non_empty_string()->assert($this->completionText); |
| 19 | } |
| 20 | } |
| 21 | } |