Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| GoldReward | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AqwSocketClient\Objects\Quest; |
| 6 | |
| 7 | use Psl; |
| 8 | |
| 9 | final readonly class GoldReward implements QuestRewardInterface |
| 10 | { |
| 11 | public function __construct( |
| 12 | public readonly int $amount, |
| 13 | ) { |
| 14 | Psl\invariant($this->amount >= 0, 'Gold amount must be non-negative, got %d.', $this->amount); |
| 15 | } |
| 16 | } |