LoginPacket: use netresearch/jsonmapper for login data decoding

this makes retrieval static analysis friendly without extra steps.
This commit is contained in:
Dylan K. Taylor
2020-03-23 21:58:12 +00:00
parent 3e5d3a646b
commit 83a3adecff
11 changed files with 495 additions and 143 deletions

View 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{}
}