Lines
100.00%
4 / 4
Methods
100.00%
4 / 4
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| up | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| maximum | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| [Lorekeeper\Core\Game\Level\Level] __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| [Lorekeeper\Core\Game\Level\Level] __toString | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| 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 | } |
Inherited from Lorekeeper\Core\Game\Level\Level
| 15 | final public function __construct(int $value) | |
| 16 | { | |
| 17 | $this->value = Type\int_range(min: 1, max: static::maximum())->assert($value); | |
| 18 | } |
| 23 | final public function __toString(): string | |
| 24 | { | |
| 25 | return (string) $this->value; | |
| 26 | } |