mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 09:26:06 +00:00
LoginPacket: use netresearch/jsonmapper for login data decoding
this makes retrieval static analysis friendly without extra steps.
This commit is contained in:
19
tests/phpstan/stubs/JsonMapper.stub
Normal file
19
tests/phpstan/stubs/JsonMapper.stub
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
//possible bug in phpstan requires this to be defined here
|
||||
class JsonMapper_Exception extends \Exception{}
|
||||
|
||||
class JsonMapper{
|
||||
|
||||
/**
|
||||
* @template TModel of object
|
||||
*
|
||||
* @param mixed[]|object $json
|
||||
* @param TModel $object
|
||||
*
|
||||
* @return TModel
|
||||
*
|
||||
* @throws JsonMapper_Exception
|
||||
*/
|
||||
public function map($json, object $object) : object{}
|
||||
}
|
Reference in New Issue
Block a user