mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 01:16:15 +00:00
add native return types to closures (for phpstan)
This commit is contained in:
@ -63,7 +63,7 @@ class ResourcePacksPacketHandler extends PacketHandler{
|
||||
}
|
||||
|
||||
public function setUp() : void{
|
||||
$resourcePackEntries = array_map(static function(ResourcePack $pack){
|
||||
$resourcePackEntries = array_map(static function(ResourcePack $pack) : ResourcePackInfoEntry{
|
||||
//TODO: more stuff
|
||||
return new ResourcePackInfoEntry($pack->getPackId(), $pack->getPackVersion(), $pack->getPackSize(), "", "", "", false);
|
||||
}, $this->resourcePackManager->getResourceStack());
|
||||
@ -109,7 +109,7 @@ class ResourcePacksPacketHandler extends PacketHandler{
|
||||
|
||||
break;
|
||||
case ResourcePackClientResponsePacket::STATUS_HAVE_ALL_PACKS:
|
||||
$stack = array_map(static function(ResourcePack $pack){
|
||||
$stack = array_map(static function(ResourcePack $pack) : ResourcePackStackEntry{
|
||||
return new ResourcePackStackEntry($pack->getPackId(), $pack->getPackVersion(), ""); //TODO: subpacks
|
||||
}, $this->resourcePackManager->getResourceStack());
|
||||
|
||||
|
Reference in New Issue
Block a user