From 8dcc88712c6b8a4d4a0c6be2f6b908ae85378209 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 15 Jun 2020 23:04:12 +0100 Subject: [PATCH] ChunkUtils: fixed phpstan level 7 type inference error --- src/pocketmine/level/format/io/ChunkUtils.php | 1 + tests/phpstan/configs/l7-baseline.neon | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pocketmine/level/format/io/ChunkUtils.php b/src/pocketmine/level/format/io/ChunkUtils.php index 8eaf4d8653..3645b9b531 100644 --- a/src/pocketmine/level/format/io/ChunkUtils.php +++ b/src/pocketmine/level/format/io/ChunkUtils.php @@ -98,6 +98,7 @@ if(!extension_loaded('pocketmine_chunkutils')){ * Converts pre-MCPE-1.0 biome color array to biome ID array. * * @param int[] $array of biome color values + * @phpstan-param array $array */ public static function convertBiomeColors(array $array) : string{ $result = str_repeat("\x00", 256); diff --git a/tests/phpstan/configs/l7-baseline.neon b/tests/phpstan/configs/l7-baseline.neon index 703cec134f..31ebd69994 100644 --- a/tests/phpstan/configs/l7-baseline.neon +++ b/tests/phpstan/configs/l7-baseline.neon @@ -725,11 +725,6 @@ parameters: count: 1 path: ../../../src/pocketmine/level/format/Chunk.php - - - message: "#^Method pocketmine\\\\level\\\\format\\\\io\\\\ChunkUtils\\:\\:convertBiomeColors\\(\\) should return string but returns array\\\\|string\\.$#" - count: 1 - path: ../../../src/pocketmine/level/format/io/ChunkUtils.php - - message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#" count: 2