Merge branch 'stable'

This commit is contained in:
Dylan K. Taylor
2020-02-07 18:13:55 +00:00
88 changed files with 543 additions and 283 deletions

View File

@ -33,6 +33,10 @@ class StupidJsonDecodeTest extends TestCase{
$this->stupidJsonDecodeFunc = (new \ReflectionMethod(InGamePacketHandler::class, 'stupid_json_decode'))->getClosure();
}
/**
* @return mixed[][]
* @phpstan-return list<array{string,mixed}>
*/
public function stupidJsonDecodeProvider() : array{
return [
["[\n \"a\",\"b,c,d,e\\\" \",,0,1,2, false, 0.001]", ['a', 'b,c,d,e" ', '', 0, 1, 2, false, 0.001]],
@ -55,7 +59,7 @@ class StupidJsonDecodeTest extends TestCase{
*
* @throws \ReflectionException
*/
public function testStupidJsonDecode(string $brokenJson, $expect){
public function testStupidJsonDecode(string $brokenJson, $expect) : void{
$decoded = ($this->stupidJsonDecodeFunc)($brokenJson, true);
self::assertEquals($expect, $decoded);
}