Modernize property type declarations

This commit is contained in:
Dylan K. Taylor
2022-06-04 18:16:32 +01:00
parent 23695fb900
commit 083a35f970
114 changed files with 431 additions and 863 deletions

View File

@ -40,62 +40,22 @@ use function register_shutdown_function;
use const PTHREADS_INHERIT_NONE;
class RakLibServer extends Thread{
private InternetAddress $address;
/** @var \ThreadedLogger */
protected $logger;
/** @var bool */
protected $cleanShutdown = false;
/** @var bool */
protected $ready = false;
/** @var \Threaded */
protected $mainToThreadBuffer;
/** @var \Threaded */
protected $threadToMainBuffer;
/** @var string */
protected $mainPath;
/** @var int */
protected $serverId;
/** @var int */
protected $maxMtuSize;
private int $protocolVersion;
/** @var SleeperNotifier */
protected $mainThreadNotifier;
/** @var RakLibThreadCrashInfo|null */
public $crashInfo = null;
protected bool $cleanShutdown = false;
protected bool $ready = false;
protected string $mainPath;
public ?RakLibThreadCrashInfo $crashInfo = null;
public function __construct(
\ThreadedLogger $logger,
\Threaded $mainToThreadBuffer,
\Threaded $threadToMainBuffer,
InternetAddress $address,
int $serverId,
int $maxMtuSize,
int $protocolVersion,
SleeperNotifier $sleeper
protected \ThreadedLogger $logger,
protected \Threaded $mainToThreadBuffer,
protected \Threaded $threadToMainBuffer,
protected InternetAddress $address,
protected int $serverId,
protected int $maxMtuSize,
protected int $protocolVersion,
protected SleeperNotifier $mainThreadNotifier
){
$this->address = $address;
$this->serverId = $serverId;
$this->maxMtuSize = $maxMtuSize;
$this->logger = $logger;
$this->mainToThreadBuffer = $mainToThreadBuffer;
$this->threadToMainBuffer = $threadToMainBuffer;
$this->mainPath = \pocketmine\PATH;
$this->protocolVersion = $protocolVersion;
$this->mainThreadNotifier = $sleeper;
}
/**