TextFormat: wrap all preg_replace() usages in a type-safe exception-throwing version

fixes 3 phpstan level 8 errors
This commit is contained in:
Dylan K. Taylor
2020-06-15 23:31:46 +01:00
parent 1fb5043eb1
commit 23b97d8e2d
2 changed files with 15 additions and 15 deletions

View File

@ -1760,16 +1760,6 @@ parameters:
count: 1
path: ../../../src/pocketmine/utils/MainLogger.php
-
message: "#^Parameter \\#3 \\$subject of function str_replace expects array\\|string, string\\|null given\\.$#"
count: 2
path: ../../../src/pocketmine/utils/TextFormat.php
-
message: "#^Method pocketmine\\\\utils\\\\TextFormat\\:\\:colorize\\(\\) should return string but returns string\\|null\\.$#"
count: 1
path: ../../../src/pocketmine/utils/TextFormat.php
-
message: "#^Method pocketmine\\\\utils\\\\Utils\\:\\:printable\\(\\) should return string but returns string\\|null\\.$#"
count: 1