phpstan 1.4.8

This commit is contained in:
Dylan K. Taylor 2022-03-09 18:30:54 +00:00
parent b6e7ad187a
commit 8efa299c65
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
5 changed files with 60 additions and 30 deletions

View File

@ -53,7 +53,7 @@
"webmozart/path-util": "^2.3"
},
"require-dev": {
"phpstan/phpstan": "1.3.3",
"phpstan/phpstan": "1.4.8",
"phpstan/phpstan-phpunit": "^1.0.0",
"phpstan/phpstan-strict-rules": "^1.0.0",
"phpunit/phpunit": "^9.2"

16
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "33a1d10231e0bce92d724bb738b14359",
"content-hash": "5c2d1cead2820a792c7a1494fe2e8ba4",
"packages": [
{
"name": "adhocore/json-comment",
@ -1906,16 +1906,16 @@
},
{
"name": "phpstan/phpstan",
"version": "1.3.3",
"version": "1.4.8",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "151a51f6149855785fbd883e79768c0abc96b75f"
"reference": "2a6d6704b17c4db6190cc3104056c0aad740cb15"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/151a51f6149855785fbd883e79768c0abc96b75f",
"reference": "151a51f6149855785fbd883e79768c0abc96b75f",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/2a6d6704b17c4db6190cc3104056c0aad740cb15",
"reference": "2a6d6704b17c4db6190cc3104056c0aad740cb15",
"shasum": ""
},
"require": {
@ -1931,7 +1931,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
"dev-master": "1.4-dev"
}
},
"autoload": {
@ -1946,7 +1946,7 @@
"description": "PHPStan - PHP Static Analysis Tool",
"support": {
"issues": "https://github.com/phpstan/phpstan/issues",
"source": "https://github.com/phpstan/phpstan/tree/1.3.3"
"source": "https://github.com/phpstan/phpstan/tree/1.4.8"
},
"funding": [
{
@ -1966,7 +1966,7 @@
"type": "tidelift"
}
],
"time": "2022-01-07T09:49:03+00:00"
"time": "2022-03-04T13:03:56+00:00"
},
{
"name": "phpstan/phpstan-phpunit",

View File

@ -156,7 +156,7 @@ class PluginDescription{
$k = $v;
$v = "*";
}
$this->extensions[$k] = array_map('strval', is_array($v) ? $v : [$v]);
$this->extensions[(string) $k] = array_map('strval', is_array($v) ? $v : [$v]);
}
}

View File

@ -435,11 +435,6 @@ parameters:
count: 3
path: ../../../src/block/tile/Spawnable.php
-
message: "#^Array \\(array\\<class\\-string\\<pocketmine\\\\block\\\\tile\\\\Tile\\>, string\\>\\) does not accept string\\|false\\.$#"
count: 1
path: ../../../src/block/tile/TileFactory.php
-
message: "#^Parameter \\#2 \\$replace of function str_replace expects array\\|string, string\\|null given\\.$#"
count: 1
@ -765,14 +760,9 @@ parameters:
count: 1
path: ../../../src/plugin/PluginDescription.php
-
message: "#^Array \\(array\\<string\\>\\) does not accept mixed\\.$#"
count: 2
path: ../../../src/plugin/PluginDescription.php
-
message: "#^Cannot cast mixed to string\\.$#"
count: 4
count: 5
path: ../../../src/plugin/PluginDescription.php
-
@ -800,6 +790,16 @@ parameters:
count: 1
path: ../../../src/plugin/PluginDescription.php
-
message: "#^Property pocketmine\\\\plugin\\\\PluginDescription\\:\\:\\$authors \\(array\\<string\\>\\) does not accept array\\.$#"
count: 1
path: ../../../src/plugin/PluginDescription.php
-
message: "#^Property pocketmine\\\\plugin\\\\PluginDescription\\:\\:\\$authors \\(array\\<string\\>\\) does not accept array\\<mixed\\>\\.$#"
count: 1
path: ../../../src/plugin/PluginDescription.php
-
message: "#^Property pocketmine\\\\plugin\\\\PluginDescription\\:\\:\\$depend \\(array\\<string\\>\\) does not accept array\\.$#"
count: 1
@ -860,11 +860,6 @@ parameters:
count: 1
path: ../../../src/resourcepacks/ZippedResourcePack.php
-
message: "#^Cannot call method count\\(\\) on ArrayObject\\<int, array\\<string, mixed\\>\\>\\|null\\.$#"
count: 1
path: ../../../src/scheduler/AsyncTask.php
-
message: "#^Cannot call method getNotifier\\(\\) on pocketmine\\\\scheduler\\\\AsyncWorker\\|null\\.$#"
count: 1

View File

@ -5,6 +5,11 @@ parameters:
count: 1
path: ../../../src/block/BaseBanner.php
-
message: "#^Property pocketmine\\\\block\\\\tile\\\\TileFactory\\:\\:\\$saveNames \\(array\\<class\\-string\\<pocketmine\\\\block\\\\tile\\\\Tile\\>, string\\>\\) does not accept array\\<class\\-string\\<pocketmine\\\\block\\\\tile\\\\Tile\\>, bool\\|string\\>\\.$#"
count: 1
path: ../../../src/block/tile/TileFactory.php
-
message: "#^Comparison operation \"\\<\" between int\\<1, max\\> and 1 is always false\\.$#"
count: 1
@ -25,6 +30,26 @@ parameters:
count: 1
path: ../../../src/entity/projectile/Projectile.php
-
message: "#^Match arm comparison between 4 and 4 is always true\\.$#"
count: 1
path: ../../../src/network/mcpe/handler/InGamePacketHandler.php
-
message: "#^Match arm is unreachable because previous comparison is always true\\.$#"
count: 1
path: ../../../src/network/mcpe/handler/InGamePacketHandler.php
-
message: "#^Property pocketmine\\\\network\\\\mcpe\\\\raklib\\\\PthreadsChannelWriter\\:\\:\\$buffer is never read, only written\\.$#"
count: 1
path: ../../../src/network/mcpe/raklib/PthreadsChannelWriter.php
-
message: "#^Property pocketmine\\\\network\\\\mcpe\\\\raklib\\\\SnoozeAwarePthreadsChannelWriter\\:\\:\\$buffer is never read, only written\\.$#"
count: 1
path: ../../../src/network/mcpe/raklib/SnoozeAwarePthreadsChannelWriter.php
-
message: "#^Comparison operation \"\\<\" between int\\<1, max\\> and 1 is always false\\.$#"
count: 1
@ -36,14 +61,19 @@ parameters:
path: ../../../src/plugin/PluginManager.php
-
message: "#^Parameter \\#1 \\$closure of static method pocketmine\\\\utils\\\\Utils\\:\\:getNiceClosureName\\(\\) expects Closure\\(\\*NEVER\\*, \\*NEVER\\*, \\*NEVER\\*, \\*NEVER\\*, \\*NEVER\\*, \\*NEVER\\*, \\*NEVER\\*, \\*NEVER\\*, \\*NEVER\\*, \\*NEVER\\*\\)\\: mixed, Closure\\(TEvent of pocketmine\\\\event\\\\Event\\)\\: void given\\.$#"
message: "#^Static property pocketmine\\\\scheduler\\\\AsyncTask\\:\\:\\$threadLocalStorage \\(ArrayObject\\<int, array\\<string, mixed\\>\\>\\|null\\) does not accept non\\-empty\\-array\\<int, non\\-empty\\-array\\<string, mixed\\>\\>\\|ArrayObject\\<int, array\\<string, mixed\\>\\>\\.$#"
count: 1
path: ../../../src/plugin/PluginManager.php
path: ../../../src/scheduler/AsyncTask.php
-
message: "#^Parameter \\#1 \\$yamlString of class pocketmine\\\\plugin\\\\PluginDescription constructor expects array\\|string, array\\<string\\> given\\.$#"
message: "#^Property pocketmine\\\\thread\\\\Thread\\:\\:\\$classLoaders \\(\\(iterable\\<ClassLoader\\>&Threaded\\)\\|null\\) does not accept array\\<int, ClassLoader\\>\\|\\(iterable\\<ClassLoader\\>&Threaded\\)\\.$#"
count: 1
path: ../../../src/plugin/ScriptPluginLoader.php
path: ../../../src/thread/Thread.php
-
message: "#^Property pocketmine\\\\thread\\\\Worker\\:\\:\\$classLoaders \\(\\(iterable\\<ClassLoader\\>&Threaded\\)\\|null\\) does not accept array\\<int, ClassLoader\\>\\|\\(iterable\\<ClassLoader\\>&Threaded\\)\\.$#"
count: 1
path: ../../../src/thread/Worker.php
-
message: "#^Dead catch \\- JsonException is never thrown in the try block\\.$#"
@ -55,3 +85,8 @@ parameters:
count: 2
path: ../../../src/world/format/io/region/RegionLoader.php
-
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertNotSame\\(\\) with arguments stdClass, stdClass and 'Cloning registry…' will always evaluate to false\\.$#"
count: 1
path: ../../phpunit/utils/CloningRegistryTraitTest.php