Lines 100.00% 6 / 6
Methods 100.00% 4 / 4
Classes 100.00% 1 / 1
Name Lines Methods CRAP
 describe 100.00% 1 / 1 100.00% 1 / 1 1
 [Lorekeeper\Core\Game\Attribute\Stat\Resistance\Resistance] effective 100.00% 1 / 1 100.00% 1 / 1 1
 [Lorekeeper\Core\Support\SignedRatio] __construct 100.00% 3 / 3 100.00% 1 / 1 2
 [Lorekeeper\Core\Support\SignedRatio] __toString 100.00% 1 / 1 100.00% 1 / 1 1
10final readonly class DotResistance extends Resistance
11{
12    protected const float CAP = 1.0;
13
14    #[Override]
15    public function describe(): StatDescription
16    {
17        return new StatDescription('Reduces incoming damage over time, while it ticks.');
18    }
19}

Inherited from Lorekeeper\Core\Game\Attribute\Stat\Resistance\Resistance

14    public function effective(): float
15    {
16        return min($this->value, static::CAP);
17    }

Inherited from Lorekeeper\Core\Support\SignedRatio

15    final public function __construct(float $value)
16    {
17        if (!is_finite($value)) {
18            throw new InvalidArgumentException("Ratio {$value} is not a finite number.");
19        }
20
21        $this->value = $value;
22    }
24    final public function __toString(): string
25    {
26        return (string) $this->value;
27    }