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
PickUpDropCommand 100.00% 2 / 2 100.00% 2 / 2 2 100.00% 1 / 1
 __construct 100.00% 1 / 1 100.00% 1 / 1 1
 toMessage 100.00% 1 / 1 100.00% 1 / 1 1
1<?php
2
3declare(strict_types=1);
4
5namespace Lorekeeper\Client\Command\Inventory;
6
7use Lorekeeper\Client\Command\Command;
8use Lorekeeper\Core\Item\ItemId;
9use Lorekeeper\Core\Player\PlayerSpawnId;
10use Override;
11
12final readonly class PickUpDropCommand implements Command
13{
14    public function __construct(
15        private PlayerSpawnId $player,
16        private ItemId $item,
17    ) {}
18
19    #[Override]
20    public function toMessage(): string
21    {
22        return "%xt%zm%getDrop%{$this->player}%{$this->item->value}%";
23    }
24}