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
Inventory 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\Item;
6
7use Lorekeeper\Core\Support\Collection;
8
9/**
10 * @template T of Item
11 *
12 * @extends Collection<ItemId, T>
13 */
14class Inventory extends Collection
15{
16    /** @param T $item */
17    final protected static function key(mixed $item): ItemId
18    {
19        return $item->id;
20    }
21}