mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
NetworkSession: Fixed missing nullable declarations
phpstan doesn't report these because .. reasons .. @ondrejmirtes this is causing bugs to go unfound :( I'm aware of the irony that I just silenced the bugs that were exposed by this commit .. that's an architectural problem for another day
This commit is contained in:
parent
04a6e89d6f
commit
e5dd5a5745
@ -137,8 +137,8 @@ class NetworkSession{
|
||||
private $ip;
|
||||
/** @var int */
|
||||
private $port;
|
||||
/** @var PlayerInfo */
|
||||
private $info;
|
||||
/** @var PlayerInfo|null */
|
||||
private $info = null;
|
||||
/** @var int|null */
|
||||
private $ping = null;
|
||||
|
||||
@ -158,8 +158,8 @@ class NetworkSession{
|
||||
/** @var CompoundTag|null */
|
||||
private $cachedOfflinePlayerData = null;
|
||||
|
||||
/** @var EncryptionContext */
|
||||
private $cipher;
|
||||
/** @var EncryptionContext|null */
|
||||
private $cipher = null;
|
||||
|
||||
/** @var Packet[] */
|
||||
private $sendBuffer = [];
|
||||
|
@ -105,6 +105,16 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/NetworkSession.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method getUsername\\(\\) on pocketmine\\\\player\\\\PlayerInfo\\|null\\.$#"
|
||||
count: 2
|
||||
path: ../../../src/network/mcpe/NetworkSession.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method getUuid\\(\\) on pocketmine\\\\player\\\\PlayerInfo\\|null\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/NetworkSession.php
|
||||
|
||||
-
|
||||
message: "#^Cannot call method sendData\\(\\) on pocketmine\\\\player\\\\Player\\|null\\.$#"
|
||||
count: 1
|
||||
@ -170,6 +180,11 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/NetworkSession.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$playerInfo of method pocketmine\\\\Server\\:\\:createPlayer\\(\\) expects pocketmine\\\\player\\\\PlayerInfo, pocketmine\\\\player\\\\PlayerInfo\\|null given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/NetworkSession.php
|
||||
|
||||
-
|
||||
message: "#^Property pocketmine\\\\network\\\\mcpe\\\\protocol\\\\LevelSoundEventPacket\\:\\:\\$position \\(pocketmine\\\\math\\\\Vector3\\) does not accept pocketmine\\\\math\\\\Vector3\\|null\\.$#"
|
||||
count: 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user