Item::jsonDeserialize(): remove bogus phpdoc (we don't actually know if this is even valid)

This commit is contained in:
Dylan K. Taylor 2022-06-27 14:30:12 +01:00
parent b61a934c9f
commit bedc9cf518
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
3 changed files with 17 additions and 15 deletions

View File

@ -605,14 +605,6 @@ class Item implements \JsonSerializable{
/**
* Returns an Item from properties created in an array by {@link Item#jsonSerialize}
* @param mixed[] $data
* @phpstan-param array{
* id: int,
* damage?: int,
* count?: int,
* nbt?: string,
* nbt_hex?: string,
* nbt_b64?: string
* } $data
*
* @throws NbtDataException
* @throws \InvalidArgumentException

View File

@ -581,7 +581,7 @@ parameters:
path: ../../../src/inventory/CreativeInventory.php
-
message: "#^Parameter \\#1 \\$data of static method pocketmine\\\\item\\\\Item\\:\\:jsonDeserialize\\(\\) expects array\\{id\\: int, damage\\?\\: int, count\\?\\: int, nbt\\?\\: string, nbt_hex\\?\\: string, nbt_b64\\?\\: string\\}, mixed given\\.$#"
message: "#^Parameter \\#1 \\$data of static method pocketmine\\\\item\\\\Item\\:\\:jsonDeserialize\\(\\) expects array, mixed given\\.$#"
count: 1
path: ../../../src/inventory/CreativeInventory.php
@ -601,7 +601,22 @@ parameters:
path: ../../../src/inventory/transaction/CraftingTransaction.php
-
message: "#^Parameter \\#1 \\$buffer of method pocketmine\\\\nbt\\\\BaseNbtSerializer\\:\\:read\\(\\) expects string, string\\|false given\\.$#"
message: "#^Cannot cast mixed to int\\.$#"
count: 3
path: ../../../src/item/Item.php
-
message: "#^Parameter \\#1 \\$buffer of method pocketmine\\\\nbt\\\\BaseNbtSerializer\\:\\:read\\(\\) expects string, mixed given\\.$#"
count: 1
path: ../../../src/item/Item.php
-
message: "#^Parameter \\#1 \\$string of function base64_decode expects string, mixed given\\.$#"
count: 1
path: ../../../src/item/Item.php
-
message: "#^Parameter \\#1 \\$string of function hex2bin expects string, mixed given\\.$#"
count: 1
path: ../../../src/item/Item.php

View File

@ -1,10 +1,5 @@
parameters:
ignoreErrors:
-
message: "#^Casting to int something that's already int\\.$#"
count: 2
path: ../../../src/item/Item.php
-
message: "#^Instanceof between pocketmine\\\\nbt\\\\tag\\\\CompoundTag and pocketmine\\\\nbt\\\\tag\\\\CompoundTag will always evaluate to true\\.$#"
count: 1