add some phpstan array types

This commit is contained in:
Dylan K. Taylor
2020-01-30 22:06:21 +00:00
parent 4ff4434a22
commit 260ac47588
39 changed files with 177 additions and 27 deletions

View File

@ -46,6 +46,7 @@ class BulkCurlTask extends AsyncTask{
*
* @param mixed[][] $operations
* @param mixed|null $complexData
* @phpstan-param list<array{page: string, timeout?: float, extraHeaders?: list<string>, extraOpts?: array<int, mixed>}> $operations
*/
public function __construct(array $operations, $complexData = null){
$this->storeLocal($complexData);
@ -53,6 +54,7 @@ class BulkCurlTask extends AsyncTask{
}
public function onRun(){
/** @phpstan-var list<array{page: string, timeout?: float, extraHeaders?: list<string>, extraOpts?: array<int, mixed>}> $operations */
$operations = unserialize($this->operations);
$results = [];
foreach($operations as $op){

View File

@ -51,6 +51,7 @@ class SendUsageTask extends AsyncTask{
/**
* @param string[] $playerList
* @phpstan-param array<string, string> $playerList
*/
public function __construct(Server $server, int $type, array $playerList = []){
$endpoint = "http://" . $server->getProperty("anonymous-statistics.host", "stats.pocketmine.net") . "/";