Lines
100.00%
2 / 2
Functions and Methods
100.00%
2 / 2
Classes and Traits
100.00%
1 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| PlayerLevel | 100.00% | 2 / 2 | 100.00% | 2 / 2 | 2 | 100.00% | 1 / 1 | |||
| up | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | |||||
| maximum | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Lorekeeper\Core\Player; | |
| 6 | ||
| 7 | use Lorekeeper\Core\Game\Level\Level; | |
| 8 | use Override; | |
| 9 | ||
| 10 | final readonly class PlayerLevel extends Level | |
| 11 | { | |
| 12 | public function up(): self | |
| 13 | { | |
| 14 | return new self($this->value + 1); | |
| 15 | } | |
| 16 | ||
| 17 | #[Override] | |
| 18 | protected static function maximum(): int | |
| 19 | { | |
| 20 | return 100; | |
| 21 | } | |
| 22 | } |