Skip to content

Commit

Permalink
Fix PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
dries-c committed Aug 1, 2023
1 parent e381a78 commit 1cfae1a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/network/mcpe/NetworkSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,13 @@ public function __construct(
$this->setHandler(new LoginPacketHandler(
$this->server,
$this,
$this->onSessionStartSuccess(...)
function(PlayerInfo $info) : void{
$this->info = $info;
$this->logger->info($this->server->getLanguage()->translate(KnownTranslationFactory::pocketmine_network_session_playerName(TextFormat::AQUA . $info->getUsername() . TextFormat::RESET)));
$this->logger->setPrefix($this->getLogPrefix());
$this->manager->markLoginReceived($this);
},
$this->setAuthenticationStatus(...)
));

$this->manager->add($this);
Expand Down Expand Up @@ -417,7 +423,7 @@ public function handleEncoded(string $payload) : void{
$this->enableCompression = false;
$this->setHandler(new SessionStartPacketHandler(
$this,
fn() => $this->onSessionStartSuccess()
$this->onSessionStartSuccess(...)
));

$decompressed = $payload;
Expand Down

0 comments on commit 1cfae1a

Please sign in to comment.