mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-11 14:02:05 +00:00
fix PHPstan
This commit is contained in:
parent
930c8a1f82
commit
f5867851a5
@ -196,7 +196,7 @@ final class BlockObjectToStateSerializer implements BlockStateSerializer{
|
|||||||
* describe the bottom type of a type hierarchy only containing Block.
|
* describe the bottom type of a type hierarchy only containing Block.
|
||||||
*
|
*
|
||||||
* @var \Closure[]
|
* @var \Closure[]
|
||||||
* @phpstan-var array<int, \Closure(never) : Writer|string>
|
* @phpstan-var array<int, (\Closure(never) : Writer|string)>
|
||||||
*/
|
*/
|
||||||
private array $serializers = [];
|
private array $serializers = [];
|
||||||
|
|
||||||
@ -233,7 +233,7 @@ final class BlockObjectToStateSerializer implements BlockStateSerializer{
|
|||||||
/**
|
/**
|
||||||
* @phpstan-template TBlockType of Block
|
* @phpstan-template TBlockType of Block
|
||||||
* @phpstan-param TBlockType $block
|
* @phpstan-param TBlockType $block
|
||||||
* @phpstan-param \Closure(TBlockType) : Writer|string $serializer
|
* @phpstan-param (\Closure(TBlockType) : Writer|string) $serializer
|
||||||
*/
|
*/
|
||||||
public function map(Block $block, \Closure $serializer) : void{
|
public function map(Block $block, \Closure $serializer) : void{
|
||||||
if(isset($this->serializers[$block->getTypeId()])){
|
if(isset($this->serializers[$block->getTypeId()])){
|
||||||
@ -278,7 +278,7 @@ final class BlockObjectToStateSerializer implements BlockStateSerializer{
|
|||||||
* In the future we'll need some way to guarantee that type IDs are never reused (perhaps spl_object_id()?)
|
* In the future we'll need some way to guarantee that type IDs are never reused (perhaps spl_object_id()?)
|
||||||
*
|
*
|
||||||
* @var \Closure $serializer
|
* @var \Closure $serializer
|
||||||
* @phpstan-var \Closure(TBlockType) : Writer|string $serializer
|
* @phpstan-var (\Closure(TBlockType) : Writer|string) $serializer
|
||||||
*/
|
*/
|
||||||
$serializer = $locatedSerializer;
|
$serializer = $locatedSerializer;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user