PotionTypeIdMap: fixed uninitialized fields

I have no idea why this didn't ever cause a problem before... probably an edge-case in the typed properties implementation
This commit is contained in:
Dylan K. Taylor 2022-12-19 15:33:15 +00:00
parent 437fa615b8
commit 529700bb8b
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -33,13 +33,13 @@ final class PotionTypeIdMap{
* @var PotionType[] * @var PotionType[]
* @phpstan-var array<int, PotionType> * @phpstan-var array<int, PotionType>
*/ */
private array $idToEnum; private array $idToEnum = [];
/** /**
* @var int[] * @var int[]
* @phpstan-var array<int, int> * @phpstan-var array<int, int>
*/ */
private array $enumToId; private array $enumToId = [];
private function __construct(){ private function __construct(){
$this->register(PotionTypeIds::WATER, PotionType::WATER()); $this->register(PotionTypeIds::WATER, PotionType::WATER());