mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-08 04:38:35 +00:00
Easy wins for PHPStan 2.0 support
This commit is contained in:
parent
fe70150db2
commit
f3cc4a28e1
@ -48,8 +48,6 @@ parameters:
|
|||||||
- tests/phpstan/stubs/leveldb.stub
|
- tests/phpstan/stubs/leveldb.stub
|
||||||
- tests/phpstan/stubs/pmmpthread.stub
|
- tests/phpstan/stubs/pmmpthread.stub
|
||||||
reportUnmatchedIgnoredErrors: false #no other way to silence platform-specific non-warnings
|
reportUnmatchedIgnoredErrors: false #no other way to silence platform-specific non-warnings
|
||||||
staticReflectionClassNamePatterns:
|
|
||||||
- "#^COM$#"
|
|
||||||
typeAliases:
|
typeAliases:
|
||||||
#variadics don't work for this - mixed probably shouldn't work either, but for now it does
|
#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,
|
#what we actually need is something that accepts an infinite number of parameters, but in the absence of that,
|
||||||
|
@ -362,6 +362,8 @@ class Block{
|
|||||||
*
|
*
|
||||||
* A replacement block may be returned. This is useful if the block type changed due to reading of world data (e.g.
|
* A replacement block may be returned. This is useful if the block type changed due to reading of world data (e.g.
|
||||||
* data from a block entity).
|
* data from a block entity).
|
||||||
|
*
|
||||||
|
* @phpstan-impure
|
||||||
*/
|
*/
|
||||||
public function readStateFromWorld() : Block{
|
public function readStateFromWorld() : Block{
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -89,6 +89,11 @@ interface RuntimeDataDescriber extends RuntimeEnumDescriber{
|
|||||||
|
|
||||||
public function straightOnlyRailShape(int &$railShape) : void;
|
public function straightOnlyRailShape(int &$railShape) : void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @phpstan-template T of \UnitEnum
|
||||||
|
* @phpstan-param T &$case
|
||||||
|
* @phpstan-param-out T &$case
|
||||||
|
*/
|
||||||
public function enum(\UnitEnum &$case) : void;
|
public function enum(\UnitEnum &$case) : void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user