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

Pass in callable correctly

This commit is contained in:
Pavel Djundik
2015-10-22 00:06:04 +03:00
parent 29597ff1b6
commit 3c0ca191b5
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -36,7 +36,7 @@
abstract public function Write( $Header, $String = '' );
abstract public function Read( $Length = 1400 );
protected function ReadInternal( $Buffer, $SherlockFunction )
protected function ReadInternal( $Buffer, callable $SherlockFunction )
{
if( $Buffer->Remaining( ) === 0 )
{
+1 -1
View File
@@ -73,7 +73,7 @@
$Buffer = new Buffer( );
$Buffer->Set( FRead( $this->Socket, $Length ) );
$this->ReadInternal( $Buffer, $this->Sherlock );
$this->ReadInternal( $Buffer, [ $this, 'Sherlock' ] );
return $Buffer;
}
+4 -4
View File
@@ -35,7 +35,7 @@
$this->NextOutput = '';
$this->ReadInternal( $Buffer, $this->Sherlock );
$this->ReadInternal( $Buffer, [ $this, 'Sherlock' ] );
return $Buffer;
}
@@ -97,9 +97,9 @@
}
/**
* @expectedException xPaw\SourceQuery\Exception\InvalidPacketException
* @dataProvider BadInfoProvider
*/
* @expectedException xPaw\SourceQuery\Exception\InvalidPacketException
* @dataProvider BadInfoProvider
*/
public function testBadGetInfo( $Data )
{
$this->Socket->NextOutput = $Data;