From 1fb5043eb1b495e6926caecf3fb493837724c770 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 15 Jun 2020 23:16:40 +0100 Subject: [PATCH] build/server-phar: fixed a phpstan level 8 error --- build/server-phar.php | 2 +- tests/phpstan/configs/l8-baseline.neon | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/build/server-phar.php b/build/server-phar.php index 95d725e4c6..3cc3a2c7cc 100644 --- a/build/server-phar.php +++ b/build/server-phar.php @@ -49,7 +49,7 @@ require dirname(__DIR__) . '/vendor/autoload.php'; * * @return string[] */ -function preg_quote_array(array $strings, string $delim = null) : array{ +function preg_quote_array(array $strings, string $delim) : array{ return array_map(function(string $str) use ($delim) : string{ return preg_quote($str, $delim); }, $strings); } diff --git a/tests/phpstan/configs/l8-baseline.neon b/tests/phpstan/configs/l8-baseline.neon index d7c045156b..8cbb19ca4a 100644 --- a/tests/phpstan/configs/l8-baseline.neon +++ b/tests/phpstan/configs/l8-baseline.neon @@ -5,11 +5,6 @@ parameters: count: 1 path: ../../../build/make-release.php - - - message: "#^Parameter \\#2 \\$delim_char of function preg_quote expects string, string\\|null given\\.$#" - count: 1 - path: ../../../build/server-phar.php - - message: "#^Parameter \\#1 \\$uuid of method pocketmine\\\\Server\\:\\:updatePlayerListData\\(\\) expects pocketmine\\\\utils\\\\UUID, pocketmine\\\\utils\\\\UUID\\|null given\\.$#" count: 1