mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Modernize private static property declarations
This commit is contained in:
parent
1d5430937f
commit
c0b15de504
@ -80,8 +80,7 @@ abstract class Entity{
|
||||
public const MOTION_THRESHOLD = 0.00001;
|
||||
protected const STEP_CLIP_MULTIPLIER = 0.4;
|
||||
|
||||
/** @var int */
|
||||
private static $entityCount = 1;
|
||||
private static int $entityCount = 1;
|
||||
|
||||
/**
|
||||
* Returns a new runtime entity ID for a new entity.
|
||||
|
@ -30,8 +30,8 @@ use function get_class;
|
||||
|
||||
abstract class Event{
|
||||
private const MAX_EVENT_CALL_DEPTH = 50;
|
||||
/** @var int */
|
||||
private static $eventCallDepth = 1;
|
||||
|
||||
private static int $eventCallDepth = 1;
|
||||
|
||||
/** @var string|null */
|
||||
protected $eventName = null;
|
||||
|
2
src/network/mcpe/cache/ChunkCache.php
vendored
2
src/network/mcpe/cache/ChunkCache.php
vendored
@ -39,7 +39,7 @@ use function strlen;
|
||||
*/
|
||||
class ChunkCache implements ChunkListener{
|
||||
/** @var self[][] */
|
||||
private static $instances = [];
|
||||
private static array $instances = [];
|
||||
|
||||
/**
|
||||
* Fetches the ChunkCache instance for the given world. This lazily creates cache systems as needed.
|
||||
|
@ -27,8 +27,7 @@ namespace pocketmine\network\mcpe\convert;
|
||||
* Accessor for SkinAdapter
|
||||
*/
|
||||
class SkinAdapterSingleton{
|
||||
/** @var SkinAdapter|null */
|
||||
private static $skinAdapter = null;
|
||||
private static ?SkinAdapter $skinAdapter = null;
|
||||
|
||||
public static function get() : SkinAdapter{
|
||||
if(self::$skinAdapter === null){
|
||||
|
@ -27,8 +27,7 @@ use function count;
|
||||
use function spl_object_id;
|
||||
|
||||
class PermissionManager{
|
||||
/** @var PermissionManager|null */
|
||||
private static $instance = null;
|
||||
private static ?self $instance = null;
|
||||
|
||||
public static function getInstance() : PermissionManager{
|
||||
if(self::$instance === null){
|
||||
|
@ -27,8 +27,7 @@ use function spl_object_id;
|
||||
|
||||
class ThreadManager extends \Volatile{
|
||||
|
||||
/** @var ThreadManager|null */
|
||||
private static $instance = null;
|
||||
private static ?self $instance = null;
|
||||
|
||||
public static function init() : void{
|
||||
self::$instance = new ThreadManager();
|
||||
|
Loading…
x
Reference in New Issue
Block a user