1
0
mirror of https://github.com/xPaw/PHP-Source-Query.git synced 2026-05-18 13:53:35 +02:00

Add more type info

This commit is contained in:
Pavel Djundik
2020-06-23 20:10:31 +03:00
parent b87c9faab9
commit 914ec4b79a
7 changed files with 107 additions and 145 deletions
+10 -9
View File
@@ -25,24 +25,25 @@
*/
abstract class BaseSocket
{
/** @var resource */
public $Socket;
public $Engine;
public int $Engine;
public $Address;
public $Port;
public $Timeout;
public string $Address;
public int $Port;
public int $Timeout;
public function __destruct( )
{
$this->Close( );
}
abstract public function Close( );
abstract public function Open( $Address, $Port, $Timeout, $Engine );
abstract public function Write( $Header, $String = '' );
abstract public function Read( $Length = 1400 );
abstract public function Close( ) : void;
abstract public function Open( string $Address, int $Port, int $Timeout, int $Engine ) : void;
abstract public function Write( int $Header, string $String = '' ) : bool;
abstract public function Read( int $Length = 1400 ) : Buffer;
protected function ReadInternal( $Buffer, $Length, $SherlockFunction )
protected function ReadInternal( Buffer $Buffer, int $Length, callable $SherlockFunction ) : Buffer
{
if( $Buffer->Remaining( ) === 0 )
{