Modernize private property declarations in src/network

This commit is contained in:
Dylan K. Taylor
2022-05-17 21:22:33 +01:00
parent cd016bedce
commit 6eac2ea7a5
31 changed files with 154 additions and 340 deletions

View File

@@ -34,11 +34,6 @@ use function file_get_contents;
class StaticPacketCache{
use SingletonTrait;
/** @var BiomeDefinitionListPacket */
private $biomeDefs;
/** @var AvailableActorIdentifiersPacket */
private $availableActorIdentifiers;
/**
* @phpstan-return CacheableNbt<\pocketmine\nbt\tag\CompoundTag>
*/
@@ -55,10 +50,10 @@ class StaticPacketCache{
);
}
public function __construct(BiomeDefinitionListPacket $biomeDefs, AvailableActorIdentifiersPacket $availableActorIdentifiers){
$this->biomeDefs = $biomeDefs;
$this->availableActorIdentifiers = $availableActorIdentifiers;
}
public function __construct(
private BiomeDefinitionListPacket $biomeDefs,
private AvailableActorIdentifiersPacket $availableActorIdentifiers
){}
public function getBiomeDefs() : BiomeDefinitionListPacket{
return $this->biomeDefs;