Skip to content

Commit

Permalink
Updated ext-encoding stub to 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Jan 10, 2025
1 parent e1e1a92 commit 75f36a1
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 51 deletions.
5 changes: 4 additions & 1 deletion PhpStormStubsMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1417,9 +1417,12 @@ final class PhpStormStubsMap
'parallel\\Sync\\Error' => 'parallel/parallel/Sync/Error.php',
'parallel\\Sync\\Error\\IllegalValue' => 'parallel/parallel/Sync/Error/IllegalValue.php',
'php_user_filter' => 'standard/standard_0.php',
'pmmp\\encoding\\BaseByteBuffer' => 'encoding/encoding.php',
'pmmp\\encoding\\BE' => 'encoding/encoding.php',
'pmmp\\encoding\\Byte' => 'encoding/encoding.php',
'pmmp\\encoding\\ByteBuffer' => 'encoding/encoding.php',
'pmmp\\encoding\\DataDecodeException' => 'encoding/encoding.php',
'pmmp\\encoding\\LE' => 'encoding/encoding.php',
'pmmp\\encoding\\VarInt' => 'encoding/encoding.php',
'pmmp\\thread\\ConnectionException' => 'pmmpthread/ConnectionException.stub.php',
'pmmp\\thread\\NonThreadSafeValueError' => 'pmmpthread/NonThreadSafeValueError.stub.php',
'pmmp\\thread\\Pool' => 'pmmpthread/Pool.stub.php',
Expand Down
123 changes: 73 additions & 50 deletions encoding/encoding.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ final class DataDecodeException extends \RuntimeException{
}

namespace pmmp\encoding {
abstract class BaseByteBuffer{
final class ByteBuffer{

public function __construct(string $buffer = ''){}

Expand Down Expand Up @@ -43,103 +43,126 @@ public function __debugInfo() : array{}
}

namespace pmmp\encoding {
final class ByteBuffer extends \pmmp\encoding\BaseByteBuffer{
final class Byte{

public function readUnsignedByte() : int{}
private function __construct(){}

public function writeUnsignedByte(int $value) : void{}
public static function readUnsigned(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function readSignedByte() : int{}
public static function writeUnsigned(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}

public function writeSignedByte(int $value) : void{}
public static function readSigned(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function readUnsignedShortLE() : int{}
public static function writeSigned(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}
}
}

namespace pmmp\encoding {
final class BE{

private function __construct(){}

public static function readUnsignedShort(\pmmp\encoding\ByteBuffer $buffer) : int{}

public static function writeUnsignedShort(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}

public static function readSignedShort(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function readUnsignedShortBE() : int{}
public static function writeSignedShort(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}

public function readSignedShortLE() : int{}
public static function readUnsignedInt(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function readSignedShortBE() : int{}
public static function writeUnsignedInt(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}

public function writeUnsignedShortLE(int $value) : void{}
public static function readSignedInt(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function writeUnsignedShortBE(int $value) : void{}
public static function writeSignedInt(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}

public function writeSignedShortLE(int $value) : void{}
public static function readSignedLong(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function writeSignedShortBE(int $value) : void{}
public static function writeSignedLong(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}

public function readUnsignedIntLE() : int{}
public static function readFloat(\pmmp\encoding\ByteBuffer $buffer) : float{}

public function readUnsignedIntBE() : int{}
public static function writeFloat(\pmmp\encoding\ByteBuffer $buffer, float $value) : void{}

public function readSignedIntLE() : int{}
public static function readDouble(\pmmp\encoding\ByteBuffer $buffer) : float{}

public function readSignedIntBE() : int{}
public static function writeDouble(\pmmp\encoding\ByteBuffer $buffer, float $value) : void{}

public function writeUnsignedIntLE(int $value) : void{}
public static function readUnsignedTriad(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function writeUnsignedIntBE(int $value) : void{}
public static function writeUnsignedTriad(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}

public function writeSignedIntLE(int $value) : void{}
public static function readSignedTriad(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function writeSignedIntBE(int $value) : void{}
public static function writeSignedTriad(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}
}
}

namespace pmmp\encoding {
final class LE{

public function readSignedLongLE() : int{}
private function __construct(){}

public function readSignedLongBE() : int{}
public static function readUnsignedShort(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function writeSignedLongLE(int $value) : void{}
public static function writeUnsignedShort(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}

public function writeSignedLongBE(int $value) : void{}
public static function readSignedShort(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function readFloatLE() : float{}
public static function writeSignedShort(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}

public function readFloatBE() : float{}
public static function readUnsignedInt(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function writeFloatLE(float $value) : void{}
public static function writeUnsignedInt(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}

public function writeFloatBE(float $value) : void{}
public static function readSignedInt(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function readDoubleLE() : float{}
public static function writeSignedInt(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}

public function readDoubleBE() : float{}
public static function readSignedLong(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function writeDoubleLE(float $value) : void{}
public static function writeSignedLong(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}

public function writeDoubleBE(float $value) : void{}
public static function readFloat(\pmmp\encoding\ByteBuffer $buffer) : float{}

public function readUnsignedVarInt() : int{}
public static function writeFloat(\pmmp\encoding\ByteBuffer $buffer, float $value) : void{}

public function readSignedVarInt() : int{}
public static function readDouble(\pmmp\encoding\ByteBuffer $buffer) : float{}

public function writeUnsignedVarInt(int $value) : void{}
public static function writeDouble(\pmmp\encoding\ByteBuffer $buffer, float $value) : void{}

public function writeSignedVarInt(int $value) : void{}
public static function readUnsignedTriad(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function readUnsignedVarLong() : int{}
public static function writeUnsignedTriad(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}

public function readSignedVarLong() : int{}
public static function readSignedTriad(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function writeUnsignedVarLong(int $value) : void{}
public static function writeSignedTriad(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}
}
}

namespace pmmp\encoding {
final class VarInt{

public function writeSignedVarLong(int $value) : void{}
private function __construct(){}

public function readUnsignedTriadBE() : int{}
public static function readUnsignedInt(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function readUnsignedTriadLE() : int{}
public static function readSignedInt(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function writeUnsignedTriadBE(int $value) : void{}
public static function writeUnsignedInt(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}

public function writeUnsignedTriadLE(int $value) : void{}
public static function writeSignedInt(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}

public function readSignedTriadBE() : int{}
public static function readUnsignedLong(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function readSignedTriadLE() : int{}
public static function readSignedLong(\pmmp\encoding\ByteBuffer $buffer) : int{}

public function writeSignedTriadBE(int $value) : void{}
public static function writeUnsignedLong(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}

public function writeSignedTriadLE(int $value) : void{}
public static function writeSignedLong(\pmmp\encoding\ByteBuffer $buffer, int $value) : void{}
}
}

0 comments on commit 75f36a1

Please sign in to comment.