mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 07:39:42 +00:00
phpdoc: populate missing parameter typeinfo
This commit is contained in:
@@ -61,6 +61,10 @@ class Network{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param float $upload
|
||||
* @param float $download
|
||||
*/
|
||||
public function addStatistics($upload, $download){
|
||||
$this->upload += $upload;
|
||||
$this->download += $download;
|
||||
|
@@ -217,6 +217,9 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $name
|
||||
*/
|
||||
public function setPortCheck($name){
|
||||
$this->interface->sendOption("portChecking", (bool) $name);
|
||||
}
|
||||
|
@@ -162,6 +162,13 @@ class CraftingDataPacket extends DataPacket{
|
||||
$this->cleanRecipes = $this->getBool();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param object $entry
|
||||
* @param NetworkBinaryStream $stream
|
||||
* @param int $pos
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
private static function writeEntry($entry, NetworkBinaryStream $stream, int $pos){
|
||||
if($entry instanceof ShapelessRecipe){
|
||||
return self::writeShapelessRecipe($entry, $stream, $pos);
|
||||
|
@@ -156,10 +156,17 @@ abstract class DataPacket extends NetworkBinaryStream{
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*/
|
||||
public function __get($name){
|
||||
throw new \Error("Undefined property: " . get_class($this) . "::\$" . $name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function __set($name, $value){
|
||||
throw new \Error("Undefined property: " . get_class($this) . "::\$" . $name);
|
||||
}
|
||||
|
@@ -95,6 +95,14 @@ class RCONInstance extends Thread{
|
||||
$this->start(PTHREADS_INHERIT_NONE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param resource $client
|
||||
* @param int $requestID
|
||||
* @param int $packetType
|
||||
* @param string $payload
|
||||
*
|
||||
* @return int|false
|
||||
*/
|
||||
private function writePacket($client, int $requestID, int $packetType, string $payload){
|
||||
$pk = Binary::writeLInt($requestID)
|
||||
. Binary::writeLInt($packetType)
|
||||
@@ -103,6 +111,14 @@ class RCONInstance extends Thread{
|
||||
return socket_write($client, Binary::writeLInt(strlen($pk)) . $pk);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param resource $client
|
||||
* @param int $requestID reference parameter
|
||||
* @param int $packetType reference parameter
|
||||
* @param string $payload reference parameter
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function readPacket($client, ?int &$requestID, ?int &$packetType, ?string &$payload){
|
||||
$d = @socket_read($client, 4);
|
||||
|
||||
@@ -251,6 +267,9 @@ class RCONInstance extends Thread{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param resource $client
|
||||
*/
|
||||
private function disconnectClient($client) : void{
|
||||
socket_getpeername($client, $ip, $port);
|
||||
@socket_set_option($client, SOL_SOCKET, SO_LINGER, ["l_onoff" => 1, "l_linger" => 1]);
|
||||
|
Reference in New Issue
Block a user