Lines
100.00%
1 / 1
Methods
100.00%
1 / 1
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 2 | ||
| 18 | final readonly class ShopLoadedItem | |
| 19 | { | |
| 20 | public Type\Category $category; | |
| 21 | ||
| 22 | /** | |
| 23 | * @param Option<ItemDescription> $description | |
| 24 | * @param Option<ItemPrice> $price | |
| 25 | * @param Option<Gamefile> $file | |
| 26 | * @param Option<Linkage> $link | |
| 27 | * @param Option<EquipmentSlot> $slot | |
| 28 | * @param list<MergeCost> $costs | |
| 29 | * | |
| 30 | * @mago-expect lint:excessive-parameter-list | |
| 31 | */ | |
| 32 | public function __construct( | |
| 33 | public ItemId $id, | |
| 34 | public ItemName $name, | |
| 35 | public Type\Equipment|Type\Weapon|Type\House|Type\Misc $detail, | |
| 36 | public Option $description, | |
| 37 | public Option $price, | |
| 38 | public Option $file, | |
| 39 | public Option $link, | |
| 40 | public Option $slot, | |
| 41 | public bool $memberOnly, | |
| 42 | public array $costs, | |
| 43 | ) { | |
| 44 | $this->category = $detail instanceof Type\Weapon ? $detail->parent()->parent() : $detail->parent(); | |
| 45 | } | |
| 46 | } |