code style fix

This commit is contained in:
Sunch 2025-04-27 20:36:24 +08:00
parent fc5c5625cb
commit 5e8e9330e2
361 changed files with 4766 additions and 4650 deletions

View file

@ -12,7 +12,7 @@ abstract class RakNetDataPacket extends stdClass{
public $splitID;
public $splitIndex;
private $offset = 0;
abstract public function encode();
abstract public function decode();
@ -20,11 +20,11 @@ abstract class RakNetDataPacket extends stdClass{
public function getBuffer(){
return $this->buffer;
}
public function getOffset(){
return $this->offset;
}
public function setBuffer($buffer = ""){
$this->buffer = $buffer;
$this->offset = 0;
@ -123,12 +123,12 @@ abstract class RakNetDataPacket extends stdClass{
protected function getShort($unsigned = false){
return Utils::readShort($this->get(2), $unsigned);
}
public function getSignedByte(){
$b = ord($this->get(1));
return $b >= 0x80 ? ($b-256) : $b;
return $b >= 0x80 ? ($b - 256) : $b;
}
protected function getByte(){
return ord($this->get(1));
}
@ -144,7 +144,7 @@ abstract class RakNetDataPacket extends stdClass{
}
protected function putByte($v){
$this->buffer .= chr((int)$v);
$this->buffer .= chr((int) $v);
}
protected function getString(){