Lines 100.00% 4 / 4
Methods 100.00% 3 / 3
Classes 100.00% 1 / 1
Name Lines Methods CRAP
 __construct 100.00% 1 / 1 100.00% 1 / 1 1
 describe 100.00% 1 / 1 100.00% 1 / 1 1
 holds 100.00% 2 / 2 100.00% 1 / 1 1
14final readonly class Holding implements Check
15{
16    public function __construct(
17        public ItemId $item,
18        public Quantity $quantity,
19    ) {}
20
21    #[Override]
22    public function describe(): string
23    {
24        return "Holding item {$this->item->value} ×{$this->quantity->value}";
25    }
26
27    #[Override]
28    public function holds(StepScript $bot): Generator
29    {
30        yield from [];
31
32        return $bot->me()->hero()->inventory->quantity($this->item) >= $this->quantity->value;
33    }
34}