Lines 100.00% 1 / 1
Functions and Methods 100.00% 1 / 1
Classes and Traits 100.00% 1 / 1
Name Lines Functions and Methods CRAP Classes and Traits
MapPlayers 100.00% 1 / 1 100.00% 1 / 1 1 100.00% 1 / 1
 key 100.00% 1 / 1 100.00% 1 / 1 1
1<?php
2
3declare(strict_types=1);
4
5namespace Lorekeeper\Core\World\Map;
6
7use Lorekeeper\Core\Player\PlayerSpawnId;
8use Lorekeeper\Core\Support\Collection;
9
10/**
11 * @extends Collection<PlayerSpawnId, MapPlayer>
12 */
13final class MapPlayers extends Collection
14{
15    /** @param MapPlayer $item */
16    protected static function key(mixed $item): PlayerSpawnId
17    {
18        return $item->player->spawnId;
19    }
20}