From d9b0e373bb492bb7923f95a0eb495abf982f7120 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 26 Apr 2020 00:04:17 +0100 Subject: [PATCH 1/2] Populator: fix return type of populate() --- src/pocketmine/level/generator/populator/Populator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pocketmine/level/generator/populator/Populator.php b/src/pocketmine/level/generator/populator/Populator.php index c69d04a03..f97b59189 100644 --- a/src/pocketmine/level/generator/populator/Populator.php +++ b/src/pocketmine/level/generator/populator/Populator.php @@ -32,7 +32,7 @@ use pocketmine\utils\Random; abstract class Populator{ /** - * @return mixed + * @return void */ abstract public function populate(ChunkManager $level, int $chunkX, int $chunkZ, Random $random); } From b63ad032a932d86b7e4d57e4fe6f50943100bcd0 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 26 Apr 2020 00:08:41 +0100 Subject: [PATCH 2/2] phpstan 0.12.19 --- composer.json | 2 +- composer.lock | 32 +++++++++++++++---- .../phpstan/configs/runtime-type-checks.neon | 6 ++-- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index d3d05d0c8..eed9c80d4 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "adhocore/json-comment": "^0.1.0" }, "require-dev": { - "phpstan/phpstan": "^0.12.14", + "phpstan/phpstan": "^0.12.19", "irstea/phpunit-shim": "^8.5", "phpstan/phpstan-phpunit": "^0.12.6", "phpstan/phpstan-strict-rules": "^0.12.2" diff --git a/composer.lock b/composer.lock index 992e1ab01..6e156f8cf 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "6870d7b85559a32e2929692e0a0da169", + "content-hash": "b4bca488450ecd2c1d67fef301daec57", "packages": [ { "name": "adhocore/json-comment", @@ -478,21 +478,24 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.18", + "version": "0.12.19", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "1ce27fe29c8660a27926127d350d53d80c4d4286" + "reference": "054f6d76b12ba9a6c13a5a8d5fcdf51219615f4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/1ce27fe29c8660a27926127d350d53d80c4d4286", - "reference": "1ce27fe29c8660a27926127d350d53d80c4d4286", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/054f6d76b12ba9a6c13a5a8d5fcdf51219615f4d", + "reference": "054f6d76b12ba9a6c13a5a8d5fcdf51219615f4d", "shasum": "" }, "require": { "php": "^7.1" }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, "bin": [ "phpstan", "phpstan.phar" @@ -513,7 +516,21 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", - "time": "2020-03-22T16:51:47+00:00" + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2020-04-19T20:35:10+00:00" }, { "name": "phpstan/phpstan-phpunit", @@ -649,5 +666,6 @@ "ext-zip": "*", "ext-zlib": ">=1.2.11" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } diff --git a/tests/phpstan/configs/runtime-type-checks.neon b/tests/phpstan/configs/runtime-type-checks.neon index 650cfe92e..8ec99fe95 100644 --- a/tests/phpstan/configs/runtime-type-checks.neon +++ b/tests/phpstan/configs/runtime-type-checks.neon @@ -1,7 +1,7 @@ parameters: ignoreErrors: - - message: "#^Call to function is_subclass_of\\(\\) with class\\-string\\ and 'pocketmine\\\\\\\\level…' will always evaluate to true\\.$#" + message: "#^Call to function is_subclass_of\\(\\) with class\\-string\\ and 'pocketmine\\\\\\\\level\\\\\\\\generator\\\\\\\\Generator' will always evaluate to true\\.$#" count: 1 path: ../../../src/pocketmine/Server.php @@ -66,7 +66,7 @@ parameters: path: ../../../src/pocketmine/level/Level.php - - message: "#^Call to function is_subclass_of\\(\\) with class\\-string\\ and 'pocketmine\\\\\\\\level…' will always evaluate to true\\.$#" + message: "#^Call to function is_subclass_of\\(\\) with class\\-string\\ and 'pocketmine\\\\\\\\level\\\\\\\\generator\\\\\\\\Generator' will always evaluate to true\\.$#" count: 1 path: ../../../src/pocketmine/level/generator/GeneratorManager.php @@ -76,7 +76,7 @@ parameters: path: ../../../src/pocketmine/plugin/PluginManager.php - - message: "#^Call to function is_subclass_of\\(\\) with class\\-string\\ and 'pocketmine\\\\\\\\event…' will always evaluate to true\\.$#" + message: "#^Call to function is_subclass_of\\(\\) with class\\-string\\ and 'pocketmine\\\\\\\\event\\\\\\\\Event' will always evaluate to true\\.$#" count: 1 path: ../../../src/pocketmine/plugin/PluginManager.php