mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-22 19:06:35 +00:00
BaseInventory: improve type info available to setContents() and internalSetContents()
This commit is contained in:
parent
a0ea74c08f
commit
a735a69870
@ -76,11 +76,13 @@ abstract class BaseInventory implements Inventory{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Item[] $items
|
* @param Item[] $items
|
||||||
|
* @phpstan-param array<int, Item> $items
|
||||||
*/
|
*/
|
||||||
abstract protected function internalSetContents(array $items) : void;
|
abstract protected function internalSetContents(array $items) : void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Item[] $items
|
* @param Item[] $items
|
||||||
|
* @phpstan-param array<int, Item> $items
|
||||||
*/
|
*/
|
||||||
public function setContents(array $items) : void{
|
public function setContents(array $items) : void{
|
||||||
if(count($items) > $this->getSize()){
|
if(count($items) > $this->getSize()){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user