Apply typehints to pocketmine\network\mcpe\protocol namespace

this is pulled from network-nuke in order to reduce the size of the diff.
This commit is contained in:
Dylan K. Taylor
2018-07-05 13:19:15 +01:00
parent fbd4f4a849
commit 2bba3a0805
116 changed files with 255 additions and 255 deletions

View File

@ -103,7 +103,7 @@ class AvailableCommandsPacket extends DataPacket{
*/
public $commandData = [];
protected function decodePayload(){
protected function decodePayload() : void{
for($i = 0, $this->enumValuesCount = $this->getUnsignedVarInt(); $i < $this->enumValuesCount; ++$i){
$this->enumValues[] = $this->getString();
}
@ -133,7 +133,7 @@ class AvailableCommandsPacket extends DataPacket{
return $retval;
}
protected function putEnum(CommandEnum $enum){
protected function putEnum(CommandEnum $enum) : void{
$this->putString($enum->enumName);
$this->putUnsignedVarInt(count($enum->enumValues));
@ -157,7 +157,7 @@ class AvailableCommandsPacket extends DataPacket{
}
}
protected function putEnumValueIndex(int $index){
protected function putEnumValueIndex(int $index) : void{
if($this->enumValuesCount < 256){
$this->putByte($index);
}elseif($this->enumValuesCount < 65536){
@ -201,7 +201,7 @@ class AvailableCommandsPacket extends DataPacket{
return $retval;
}
protected function putCommandData(CommandData $data){
protected function putCommandData(CommandData $data) : void{
$this->putString($data->commandName);
$this->putString($data->commandDescription);
$this->putByte($data->flags);
@ -278,7 +278,7 @@ class AvailableCommandsPacket extends DataPacket{
return "unknown ($argtype)";
}
protected function encodePayload(){
protected function encodePayload() : void{
$enumValuesMap = [];
$postfixesMap = [];
$enumMap = [];