Modernize private property declarations in src/data

This commit is contained in:
Dylan K. Taylor
2022-05-17 20:35:59 +01:00
parent d11d77d328
commit 343a12626e
5 changed files with 10 additions and 10 deletions

View File

@ -35,12 +35,12 @@ final class CoralTypeIdMap{
* @var CoralType[]
* @phpstan-var array<int, CoralType>
*/
private $idToEnum = [];
private array $idToEnum = [];
/**
* @var int[]
* @phpstan-var array<int, int>
*/
private $enumToId = [];
private array $enumToId = [];
public function __construct(){
$this->register(BlockLegacyMetadata::CORAL_VARIANT_TUBE, CoralType::TUBE());

View File

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

View File

@ -36,13 +36,13 @@ final class EffectIdMap{
* @var Effect[]
* @phpstan-var array<int, Effect>
*/
private $idToEffect = [];
private array $idToEffect = [];
/**
* @var int[]
* @phpstan-var array<int, int>
*/
private $effectToId = [];
private array $effectToId = [];
private function __construct(){
$this->register(EffectIds::SPEED, VanillaEffects::SPEED());

View File

@ -39,12 +39,12 @@ final class EnchantmentIdMap{
* @var Enchantment[]
* @phpstan-var array<int, Enchantment>
*/
private $idToEnch = [];
private array $idToEnch = [];
/**
* @var int[]
* @phpstan-var array<int, int>
*/
private $enchToId = [];
private array $enchToId = [];
private function __construct(){
$this->register(EnchantmentIds::PROTECTION, VanillaEnchantments::PROTECTION());

View File

@ -37,12 +37,12 @@ abstract class LegacyToStringBidirectionalIdMap{
* @var string[]
* @phpstan-var array<int, string>
*/
private $legacyToString = [];
private array $legacyToString = [];
/**
* @var int[]
* @phpstan-var array<string, int>
*/
private $stringToLegacy = [];
private array $stringToLegacy = [];
public function __construct(string $file){
$stringToLegacyId = json_decode(Utils::assumeNotFalse(file_get_contents($file), "Missing required resource file"), true);