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
MapMonsters 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\Support\Collection;
8use Lorekeeper\Core\World\Monster\MonsterSpawnId;
9
10/**
11 * @extends Collection<MonsterSpawnId, MapMonster>
12 */
13final class MapMonsters extends Collection
14{
15    /** @param MapMonster $item */
16    protected static function key(mixed $item): MonsterSpawnId
17    {
18        return $item->id;
19    }
20}