mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Isolate config casting nastiness in one place
this doesn't solve the underlying problem, but it does reduce the amount of noise made by PHPStan about it, as well as avoiding code litter.
This commit is contained in:
@ -15,29 +15,14 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/CrashDump.php
|
||||
|
||||
-
|
||||
message: "#^Cannot cast mixed to int\\.$#"
|
||||
count: 7
|
||||
path: ../../../src/MemoryManager.php
|
||||
|
||||
-
|
||||
message: "#^Cannot access offset 'type' on mixed\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/Server.php
|
||||
|
||||
-
|
||||
message: "#^Cannot cast mixed to float\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/Server.php
|
||||
|
||||
-
|
||||
message: "#^Cannot cast mixed to int\\.$#"
|
||||
count: 6
|
||||
path: ../../../src/Server.php
|
||||
|
||||
-
|
||||
message: "#^Cannot cast mixed to string\\.$#"
|
||||
count: 2
|
||||
count: 1
|
||||
path: ../../../src/Server.php
|
||||
|
||||
-
|
||||
@ -45,29 +30,14 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/Server.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$reason of method pocketmine\\\\network\\\\NetworkSessionManager\\:\\:close\\(\\) expects string, mixed given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/Server.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$defaultValue of method pocketmine\\\\ServerConfigGroup\\:\\:getConfigString\\(\\) expects string, mixed given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/Server.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$endpoint of class pocketmine\\\\updater\\\\AutoUpdater constructor expects string, mixed given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/Server.php
|
||||
|
||||
-
|
||||
message: "#^Cannot cast mixed to int\\.$#"
|
||||
count: 1
|
||||
count: 2
|
||||
path: ../../../src/ServerConfigGroup.php
|
||||
|
||||
-
|
||||
message: "#^Cannot cast mixed to string\\.$#"
|
||||
count: 1
|
||||
count: 2
|
||||
path: ../../../src/ServerConfigGroup.php
|
||||
|
||||
-
|
||||
@ -80,11 +50,6 @@ parameters:
|
||||
count: 2
|
||||
path: ../../../src/VersionInfo.php
|
||||
|
||||
-
|
||||
message: "#^Part \\$host \\(mixed\\) of encapsed string cannot be cast to string\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/command/defaults/TimingsCommand.php
|
||||
|
||||
-
|
||||
message: "#^Cannot cast mixed to float\\.$#"
|
||||
count: 1
|
||||
@ -115,11 +80,6 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/raklib/PthreadsChannelReader.php
|
||||
|
||||
-
|
||||
message: "#^Cannot cast mixed to int\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/network/mcpe/raklib/RakLibInterface.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$value of static method pocketmine\\\\permission\\\\PermissionParser\\:\\:defaultFromString\\(\\) expects bool\\|string, mixed given\\.$#"
|
||||
count: 1
|
||||
@ -130,11 +90,6 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/permission/PermissionParser.php
|
||||
|
||||
-
|
||||
message: "#^Cannot cast mixed to int\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/player/Player.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$description of method pocketmine\\\\command\\\\Command\\:\\:setDescription\\(\\) expects string, mixed given\\.$#"
|
||||
count: 1
|
||||
@ -240,11 +195,6 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/timings/TimingsHandler.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$str of function strtolower expects string, mixed given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/updater/AutoUpdater.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$start of function substr expects int, mixed given\\.$#"
|
||||
count: 1
|
||||
@ -285,11 +235,6 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/utils/Utils.php
|
||||
|
||||
-
|
||||
message: "#^Cannot cast mixed to int\\.$#"
|
||||
count: 4
|
||||
path: ../../../src/world/World.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$keys of function array_fill_keys expects array, mixed given\\.$#"
|
||||
count: 1
|
||||
|
Reference in New Issue
Block a user