mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Fixed some doc issues
This commit is contained in:
@ -243,14 +243,11 @@ abstract class BaseInventory implements Inventory{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function addItem(...$slots){
|
||||
public function addItem(Item ...$slots){
|
||||
/** @var Item[] $itemSlots */
|
||||
/** @var Item[] $slots */
|
||||
$itemSlots = [];
|
||||
foreach($slots as $slot){
|
||||
if(!($slot instanceof Item)){
|
||||
throw new \InvalidArgumentException("Expected Item[], got " . gettype($slot));
|
||||
}
|
||||
if($slot->getId() !== 0 and $slot->getCount() > 0){
|
||||
$itemSlots[] = clone $slot;
|
||||
}
|
||||
@ -303,14 +300,11 @@ abstract class BaseInventory implements Inventory{
|
||||
return $itemSlots;
|
||||
}
|
||||
|
||||
public function removeItem(...$slots){
|
||||
public function removeItem(Item ...$slots){
|
||||
/** @var Item[] $itemSlots */
|
||||
/** @var Item[] $slots */
|
||||
$itemSlots = [];
|
||||
foreach($slots as $slot){
|
||||
if(!($slot instanceof Item)){
|
||||
throw new \InvalidArgumentException("Expected Item[], got " . gettype($slot));
|
||||
}
|
||||
if($slot->getId() !== 0 and $slot->getCount() > 0){
|
||||
$itemSlots[] = clone $slot;
|
||||
}
|
||||
|
Reference in New Issue
Block a user