diff --git a/src/block/BlockFactory.php b/src/block/BlockFactory.php index f4710d3bb..61bffbe0b 100644 --- a/src/block/BlockFactory.php +++ b/src/block/BlockFactory.php @@ -60,14 +60,26 @@ use function min; * Manages block registration and instance creation */ class BlockFactory{ - /** @var \SplFixedArray|Block[] */ + /** + * @var \SplFixedArray|Block[] + * @phpstan-var \SplFixedArray + */ private static $fullList; - /** @var \SplFixedArray|int[] */ + /** + * @var \SplFixedArray|int[] + * @phpstan-var \SplFixedArray + */ public static $lightFilter; - /** @var \SplFixedArray|bool[] */ + /** + * @var \SplFixedArray|bool[] + * @phpstan-var \SplFixedArray + */ public static $diffusesSkyLight; - /** @var \SplFixedArray|float[] */ + /** + * @var \SplFixedArray|float[] + * @phpstan-var \SplFixedArray + */ public static $blastResistance; /** diff --git a/src/plugin/PluginManager.php b/src/plugin/PluginManager.php index 245888bfa..b459e2bd8 100644 --- a/src/plugin/PluginManager.php +++ b/src/plugin/PluginManager.php @@ -512,7 +512,7 @@ class PluginManager{ } /** - * @param string $event Class name that extends Event + * @param string $event Class name that extends Event * * @phpstan-template TEvent of Event * @phpstan-param class-string $event diff --git a/tests/phpstan/configs/runtime-type-checks.neon b/tests/phpstan/configs/runtime-type-checks.neon index 301107533..12f307383 100644 --- a/tests/phpstan/configs/runtime-type-checks.neon +++ b/tests/phpstan/configs/runtime-type-checks.neon @@ -17,6 +17,11 @@ parameters: count: 1 path: ../../../src/plugin/PluginBase.php + - + message: "#^Call to function is_subclass_of\\(\\) with class\\-string\\ and 'pocketmine\\\\\\\\event…' will always evaluate to true\\.$#" + count: 1 + path: ../../../src/plugin/PluginManager.php + - #::add() / ::remove() thread parameter message: "#^If condition is always true\\.$#"