From d0d263191db11c2474de88ccb92a205aeb669ea1 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 2 May 2023 14:21:33 +0100 Subject: [PATCH] Fix build --- src/world/light/LightUpdate.php | 2 +- tests/phpstan/configs/actual-problems.neon | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/world/light/LightUpdate.php b/src/world/light/LightUpdate.php index ffbd9b6b4..1a82bdcef 100644 --- a/src/world/light/LightUpdate.php +++ b/src/world/light/LightUpdate.php @@ -176,7 +176,7 @@ abstract class LightUpdate{ $subChunk = $subChunkExplorer->currentSubChunk; $lightArray = $this->getCurrentLightArray(); } - assert($lightArray !== null); + assert($subChunk !== null); $this->computeSpreadLight($cx, $cy, $cz, $newAdjacentLight, $context, $lightArray, $subChunk); } } diff --git a/tests/phpstan/configs/actual-problems.neon b/tests/phpstan/configs/actual-problems.neon index 99d24909c..acbfaef03 100644 --- a/tests/phpstan/configs/actual-problems.neon +++ b/tests/phpstan/configs/actual-problems.neon @@ -1160,11 +1160,6 @@ parameters: count: 1 path: ../../../src/world/light/LightPopulationTask.php - - - message: "#^Cannot call method getBlockStateId\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#" - count: 1 - path: ../../../src/world/light/LightUpdate.php - - message: "#^Cannot call method getBlockSkyLightArray\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#" count: 1 @@ -1172,7 +1167,7 @@ parameters: - message: "#^Cannot call method getBlockStateId\\(\\) on pocketmine\\\\world\\\\format\\\\SubChunk\\|null\\.$#" - count: 1 + count: 2 path: ../../../src/world/light/SkyLightUpdate.php -