mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 09:10:00 +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;
|
public const MOTION_THRESHOLD = 0.00001;
|
||||||
protected const STEP_CLIP_MULTIPLIER = 0.4;
|
protected const STEP_CLIP_MULTIPLIER = 0.4;
|
||||||
|
|
||||||
/** @var int */
|
private static int $entityCount = 1;
|
||||||
private static $entityCount = 1;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a new runtime entity ID for a new entity.
|
* Returns a new runtime entity ID for a new entity.
|
||||||
|
@ -30,8 +30,8 @@ use function get_class;
|
|||||||
|
|
||||||
abstract class Event{
|
abstract class Event{
|
||||||
private const MAX_EVENT_CALL_DEPTH = 50;
|
private const MAX_EVENT_CALL_DEPTH = 50;
|
||||||
/** @var int */
|
|
||||||
private static $eventCallDepth = 1;
|
private static int $eventCallDepth = 1;
|
||||||
|
|
||||||
/** @var string|null */
|
/** @var string|null */
|
||||||
protected $eventName = 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{
|
class ChunkCache implements ChunkListener{
|
||||||
/** @var self[][] */
|
/** @var self[][] */
|
||||||
private static $instances = [];
|
private static array $instances = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches the ChunkCache instance for the given world. This lazily creates cache systems as needed.
|
* 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
|
* Accessor for SkinAdapter
|
||||||
*/
|
*/
|
||||||
class SkinAdapterSingleton{
|
class SkinAdapterSingleton{
|
||||||
/** @var SkinAdapter|null */
|
private static ?SkinAdapter $skinAdapter = null;
|
||||||
private static $skinAdapter = null;
|
|
||||||
|
|
||||||
public static function get() : SkinAdapter{
|
public static function get() : SkinAdapter{
|
||||||
if(self::$skinAdapter === null){
|
if(self::$skinAdapter === null){
|
||||||
|
@ -27,8 +27,7 @@ use function count;
|
|||||||
use function spl_object_id;
|
use function spl_object_id;
|
||||||
|
|
||||||
class PermissionManager{
|
class PermissionManager{
|
||||||
/** @var PermissionManager|null */
|
private static ?self $instance = null;
|
||||||
private static $instance = null;
|
|
||||||
|
|
||||||
public static function getInstance() : PermissionManager{
|
public static function getInstance() : PermissionManager{
|
||||||
if(self::$instance === null){
|
if(self::$instance === null){
|
||||||
|
@ -27,8 +27,7 @@ use function spl_object_id;
|
|||||||
|
|
||||||
class ThreadManager extends \Volatile{
|
class ThreadManager extends \Volatile{
|
||||||
|
|
||||||
/** @var ThreadManager|null */
|
private static ?self $instance = null;
|
||||||
private static $instance = null;
|
|
||||||
|
|
||||||
public static function init() : void{
|
public static function init() : void{
|
||||||
self::$instance = new ThreadManager();
|
self::$instance = new ThreadManager();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user