mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
Modernize property type declarations
This commit is contained in:
@@ -89,7 +89,7 @@ class Config{
|
||||
private bool $changed = false;
|
||||
|
||||
/** @var int[] */
|
||||
public static $formats = [
|
||||
public static array $formats = [
|
||||
"properties" => Config::PROPERTIES,
|
||||
"cnf" => Config::CNF,
|
||||
"conf" => Config::CNF,
|
||||
|
@@ -64,10 +64,8 @@ use const SOCK_DGRAM;
|
||||
use const SOL_UDP;
|
||||
|
||||
class Internet{
|
||||
/** @var string|false */
|
||||
public static $ip = false;
|
||||
/** @var bool */
|
||||
public static $online = true;
|
||||
public static string|false $ip = false;
|
||||
public static bool $online = true;
|
||||
|
||||
/**
|
||||
* Gets the External IP using an external service, it is cached
|
||||
|
@@ -32,8 +32,7 @@ use const PHP_EOL;
|
||||
use const PTHREADS_INHERIT_NONE;
|
||||
|
||||
class MainLogger extends \AttachableThreadedLogger implements \BufferedLogger{
|
||||
/** @var bool */
|
||||
protected $logDebug;
|
||||
protected bool $logDebug;
|
||||
|
||||
private string $format = TextFormat::AQUA . "[%s] " . TextFormat::RESET . "%s[%s/%s]: %s" . TextFormat::RESET;
|
||||
private bool $useFormattingCodes = false;
|
||||
|
@@ -40,8 +40,7 @@ class Random{
|
||||
private int $z;
|
||||
private int $w;
|
||||
|
||||
/** @var int */
|
||||
protected $seed;
|
||||
protected int $seed;
|
||||
|
||||
/**
|
||||
* @param int $seed Integer to be used as seed.
|
||||
|
@@ -27,18 +27,11 @@ use pocketmine\thread\Thread;
|
||||
use function time;
|
||||
|
||||
class ServerKiller extends Thread{
|
||||
|
||||
/** @var int */
|
||||
public $time;
|
||||
|
||||
private bool $stopped = false;
|
||||
|
||||
/**
|
||||
* @param int $time
|
||||
*/
|
||||
public function __construct($time = 15){
|
||||
$this->time = $time;
|
||||
}
|
||||
public function __construct(
|
||||
public int $time = 15
|
||||
){}
|
||||
|
||||
protected function onRun() : void{
|
||||
$start = time();
|
||||
|
Reference in New Issue
Block a user