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

Add phpstan

This commit is contained in:
Pavel Djundik
2021-04-16 10:26:03 +03:00
parent 7a7e6b0d67
commit 890d98da92
13 changed files with 84 additions and 71 deletions
+6 -2
View File
@@ -6,10 +6,12 @@
class TestableSocket extends BaseSocket
{
/** @var \SplQueue<string> */
private \SplQueue $PacketQueue;
public function __construct( )
{
/** @var \SplQueue<string> */
$this->PacketQueue = new \SplQueue();
$this->PacketQueue->setIteratorMode( \SplDoublyLinkedList::IT_MODE_DELETE );
@@ -41,7 +43,7 @@
public function Read( int $Length = 1400 ) : Buffer
{
$Buffer = new Buffer( );
$Buffer->Set( (string)$this->PacketQueue->shift() );
$Buffer->Set( $this->PacketQueue->shift() );
$this->ReadInternal( $Buffer, $Length, [ $this, 'Sherlock' ] );
@@ -55,7 +57,7 @@
return false;
}
$Buffer->Set( (string)$this->PacketQueue->shift() );
$Buffer->Set( $this->PacketQueue->shift() );
return $Buffer->GetLong( ) === -2;
}
@@ -245,6 +247,7 @@
/**
* @dataProvider RulesProvider
* @param array<string> $RawInput
*/
public function testGetRules( array $RawInput, array $ExpectedOutput ) : void
{
@@ -280,6 +283,7 @@
/**
* @dataProvider PlayersProvider
* @param array<string> $RawInput
*/
public function testGetPlayers( array $RawInput, array $ExpectedOutput ) : void
{