mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 00:39:45 +00:00
Packet: specify void return type in phpdoc (native return type not possible yet)
This commit is contained in:
parent
2b4ce3ea6d
commit
c0a45083b6
@ -30,6 +30,15 @@ interface Packet{
|
||||
|
||||
public function setOffset(int $offset) : void;
|
||||
|
||||
/**
|
||||
* TODO: this can't have a native return type yet because of incompatibility with BinaryUtils
|
||||
* really this should be addressed by making packets not extend BinaryStream, but that's a task for another day.
|
||||
*
|
||||
* @param string $buffer
|
||||
* @param int $offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setBuffer(string $buffer = "", int $offset = 0);
|
||||
|
||||
public function getOffset() : int;
|
||||
|
@ -122,12 +122,7 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
return new SkinData($skinId, $skinResourcePatch, $skinData, $animations, $capeData, $geometryData, $animationData, $premium, $persona, $capeOnClassic, $capeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param SkinData $skin
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function putSkin(SkinData $skin){
|
||||
public function putSkin(SkinData $skin): void{
|
||||
$this->putString($skin->getSkinId());
|
||||
$this->putString($skin->getResourcePatch());
|
||||
$this->putSkinImage($skin->getSkinImage());
|
||||
|
Loading…
x
Reference in New Issue
Block a user