mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-19 15:35:52 +00:00
phpstan 0.12.99
This commit is contained in:
parent
58a95f8836
commit
e38866c4ba
@ -38,7 +38,7 @@
|
||||
"pocketmine/spl": "^0.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "0.12.98",
|
||||
"phpstan/phpstan": "0.12.99",
|
||||
"phpstan/phpstan-phpunit": "^0.12.6",
|
||||
"phpstan/phpstan-strict-rules": "^0.12.2",
|
||||
"phpunit/phpunit": "^9.2"
|
||||
|
14
composer.lock
generated
14
composer.lock
generated
@ -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": "8fc787ba6d9029fb6daa3e8c112b76c5",
|
||||
"content-hash": "f3f0ef9944d96c5b71b7e32aac5118cd",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/json-comment",
|
||||
@ -1010,16 +1010,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "0.12.98",
|
||||
"version": "0.12.99",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
"reference": "3bb7cc246c057405dd5e290c3ecc62ab51d57e00"
|
||||
"reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/3bb7cc246c057405dd5e290c3ecc62ab51d57e00",
|
||||
"reference": "3bb7cc246c057405dd5e290c3ecc62ab51d57e00",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/b4d40f1d759942f523be267a1bab6884f46ca3f7",
|
||||
"reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1050,7 +1050,7 @@
|
||||
"description": "PHPStan - PHP Static Analysis Tool",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpstan/issues",
|
||||
"source": "https://github.com/phpstan/phpstan/tree/0.12.98"
|
||||
"source": "https://github.com/phpstan/phpstan/tree/0.12.99"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1070,7 +1070,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-09-02T12:33:01+00:00"
|
||||
"time": "2021-09-12T20:09:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan-phpunit",
|
||||
|
@ -49,7 +49,7 @@ parameters:
|
||||
#variadics don't work for this - mixed probably shouldn't work either, but for now it does
|
||||
#what we actually need is something that accepts an infinite number of parameters, but in the absence of that,
|
||||
#we'll just fill it with 10 - it's very unlikely to encounter a callable with 10 parameters anyway.
|
||||
anyCallable: 'callable(mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed) : mixed'
|
||||
anyClosure: '\Closure(mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed, mixed) : mixed'
|
||||
anyCallable: 'callable(never, never, never, never, never, never, never, never, never, never) : mixed'
|
||||
anyClosure: '\Closure(never, never, never, never, never, never, never, never, never, never) : mixed'
|
||||
PhpSocket: '\Socket'
|
||||
PhpCurlHandle: '\CurlHandle'
|
||||
|
@ -233,6 +233,7 @@ class Internet{
|
||||
}
|
||||
if(!is_string($raw)) throw new AssumptionFailedError("curl_exec() should return string|false when CURLOPT_RETURNTRANSFER is set");
|
||||
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
if(!is_int($httpCode)) throw new AssumptionFailedError("curl_getinfo(CURLINFO_HTTP_CODE) always returns int");
|
||||
$headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
|
||||
$rawHeaders = substr($raw, 0, $headerSize);
|
||||
$body = substr($raw, $headerSize);
|
||||
|
@ -75,11 +75,6 @@ parameters:
|
||||
count: 2
|
||||
path: ../../../src/pocketmine/PocketMine.php
|
||||
|
||||
-
|
||||
message: "#^Cannot cast array\\<int, mixed\\>\\|string\\|false to int\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/Server.php
|
||||
|
||||
-
|
||||
message: "#^Cannot cast array\\<int, mixed\\>\\|string\\|false to string\\.$#"
|
||||
count: 1
|
||||
|
@ -260,11 +260,6 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/block/BaseRail.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$constraint of method pocketmine\\\\block\\\\BaseRail\\:\\:getPossibleConnectionDirectionsOneConstraint\\(\\) expects int, int\\|null given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/block/BaseRail.php
|
||||
|
||||
-
|
||||
message: "#^Only numeric types are allowed in \\-, int\\|null given on the left side\\.$#"
|
||||
count: 1
|
||||
|
@ -1,15 +1,60 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function array_filter expects \\(callable\\(mixed, mixed\\)\\: bool\\)\\|null, Closure\\(pocketmine\\\\Player\\)\\: bool given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/Server.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function array_filter expects \\(callable\\(mixed, mixed\\)\\: bool\\)\\|null, Closure\\(string\\)\\: bool given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/Server.php
|
||||
|
||||
-
|
||||
message: "#^Call to function is_resource\\(\\) with resource will always evaluate to true\\.$#"
|
||||
count: 3
|
||||
path: ../../../src/pocketmine/command/CommandReader.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function array_filter expects \\(callable\\(mixed, mixed\\)\\: bool\\)\\|null, Closure\\(pocketmine\\\\Player\\)\\: bool given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/command/defaults/ListCommand.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function array_filter expects \\(callable\\(mixed, mixed\\)\\: bool\\)\\|null, Closure\\(pocketmine\\\\entity\\\\Attribute\\)\\: bool given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/entity/AttributeMap.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function array_filter expects \\(callable\\(mixed, mixed\\)\\: bool\\)\\|null, Closure\\(pocketmine\\\\item\\\\Item\\)\\: bool given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/entity/Human.php
|
||||
|
||||
-
|
||||
message: "#^Call to function assert\\(\\) with false and 'unknown hit type' will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/entity/projectile/Projectile.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function usort expects callable\\(mixed, mixed\\)\\: int, array\\('pocketmine\\\\\\\\inventory\\\\\\\\CraftingManager', 'sort'\\) given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/inventory/CraftingManager.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function array_filter expects \\(callable\\(mixed, mixed\\)\\: bool\\)\\|null, Closure\\(string\\)\\: bool given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/lang/BaseLang.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function array_filter expects \\(callable\\(mixed, mixed\\)\\: bool\\)\\|null, Closure\\(pocketmine\\\\entity\\\\Entity\\)\\: bool given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/level/format/Chunk.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$callback of function array_filter expects \\(callable\\(mixed, mixed\\)\\: bool\\)\\|null, Closure\\(string\\)\\: bool given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/level/format/io/region/McRegion.php
|
||||
|
||||
-
|
||||
message: "#^Call to function is_resource\\(\\) with resource will always evaluate to true\\.$#"
|
||||
count: 2
|
||||
@ -25,11 +70,6 @@ parameters:
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/network/mcpe/protocol/DataPacket.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#1 \\$ of closure expects TMemberType, TMemberType given\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/utils/Utils.php
|
||||
|
||||
-
|
||||
message: "#^Strict comparison using \\=\\=\\= between string and false will always evaluate to false\\.$#"
|
||||
count: 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user