Lines 100.00% 3 / 3
Methods 100.00% 3 / 3
Classes 100.00% 1 / 1
Name Lines Methods CRAP
 __construct 100.00% 1 / 1 100.00% 1 / 1 1
 is 100.00% 1 / 1 100.00% 1 / 1 1
 owns 100.00% 1 / 1 100.00% 1 / 1 1
10final readonly class Identity
11{
12    public function __construct(
13        public PlayerSpawnId $spawnId,
14        public PlayerName $name,
15    ) {}
16
17    public function is(PlayerName $name): bool
18    {
19        return strcasecmp($name->value, $this->name->value) === 0;
20    }
21
22    public function owns(PlayerSpawnId $spawnId): bool
23    {
24        return $spawnId->equals($this->spawnId);
25    }
26}