mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Modernize private property declarations in src/network
This commit is contained in:
21
src/network/mcpe/cache/ChunkCache.php
vendored
21
src/network/mcpe/cache/ChunkCache.php
vendored
@ -79,23 +79,16 @@ class ChunkCache implements ChunkListener{
|
||||
}
|
||||
}
|
||||
|
||||
/** @var World */
|
||||
private $world;
|
||||
/** @var Compressor */
|
||||
private $compressor;
|
||||
|
||||
/** @var CompressBatchPromise[] */
|
||||
private $caches = [];
|
||||
private array $caches = [];
|
||||
|
||||
/** @var int */
|
||||
private $hits = 0;
|
||||
/** @var int */
|
||||
private $misses = 0;
|
||||
private int $hits = 0;
|
||||
private int $misses = 0;
|
||||
|
||||
private function __construct(World $world, Compressor $compressor){
|
||||
$this->world = $world;
|
||||
$this->compressor = $compressor;
|
||||
}
|
||||
private function __construct(
|
||||
private World $world,
|
||||
private Compressor $compressor
|
||||
){}
|
||||
|
||||
/**
|
||||
* Requests asynchronous preparation of the chunk at the given coordinates.
|
||||
|
2
src/network/mcpe/cache/CraftingDataCache.php
vendored
2
src/network/mcpe/cache/CraftingDataCache.php
vendored
@ -54,7 +54,7 @@ final class CraftingDataCache{
|
||||
* @var CraftingDataPacket[]
|
||||
* @phpstan-var array<int, CraftingDataPacket>
|
||||
*/
|
||||
private $caches = [];
|
||||
private array $caches = [];
|
||||
|
||||
public function getCache(CraftingManager $manager) : CraftingDataPacket{
|
||||
$id = spl_object_id($manager);
|
||||
|
13
src/network/mcpe/cache/StaticPacketCache.php
vendored
13
src/network/mcpe/cache/StaticPacketCache.php
vendored
@ -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;
|
||||
|
Reference in New Issue
Block a user