mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-08 12:48:32 +00:00
Merge commit 'd8d994351'
# Conflicts: # composer.lock # resources/vanilla # tests/phpstan/configs/l7-baseline.neon
This commit is contained in:
commit
f55a7f8b53
@ -50,7 +50,7 @@
|
|||||||
"respect/validation": "^2.0"
|
"respect/validation": "^2.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpstan/phpstan": "^0.12.25",
|
"phpstan/phpstan": "^0.12.29",
|
||||||
"phpstan/phpstan-phpunit": "^0.12.6",
|
"phpstan/phpstan-phpunit": "^0.12.6",
|
||||||
"phpstan/phpstan-strict-rules": "^0.12.2",
|
"phpstan/phpstan-strict-rules": "^0.12.2",
|
||||||
"phpunit/phpunit": "^9.2"
|
"phpunit/phpunit": "^9.2"
|
||||||
|
26
composer.lock
generated
26
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "fb110ec33e506f610d1cb2ca9447597a",
|
"content-hash": "b8160d3c44bfbc1212084957a8ed3731",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "adhocore/json-comment",
|
"name": "adhocore/json-comment",
|
||||||
@ -1369,16 +1369,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpstan/phpstan",
|
"name": "phpstan/phpstan",
|
||||||
"version": "0.12.25",
|
"version": "0.12.29",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpstan/phpstan.git",
|
"url": "https://github.com/phpstan/phpstan.git",
|
||||||
"reference": "9619551d68b2d4c0d681a8df73f3c847c798ee64"
|
"reference": "9771daaf6b95c6313b908d0bcdee0afcd51f838a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/9619551d68b2d4c0d681a8df73f3c847c798ee64",
|
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/9771daaf6b95c6313b908d0bcdee0afcd51f838a",
|
||||||
"reference": "9619551d68b2d4c0d681a8df73f3c847c798ee64",
|
"reference": "9771daaf6b95c6313b908d0bcdee0afcd51f838a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1407,7 +1407,21 @@
|
|||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"description": "PHPStan - PHP Static Analysis Tool",
|
"description": "PHPStan - PHP Static Analysis Tool",
|
||||||
"time": "2020-05-10T20:36:16+00:00"
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/ondrejmirtes",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://www.patreon.com/phpstan",
|
||||||
|
"type": "patreon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2020-06-14T14:10:59+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpstan/phpstan-phpunit",
|
"name": "phpstan/phpstan-phpunit",
|
||||||
|
@ -154,7 +154,10 @@ class NetworkSession{
|
|||||||
/** @var PacketBatch|null */
|
/** @var PacketBatch|null */
|
||||||
private $sendBuffer;
|
private $sendBuffer;
|
||||||
|
|
||||||
/** @var \SplQueue|CompressBatchPromise[] */
|
/**
|
||||||
|
* @var \SplQueue|CompressBatchPromise[]
|
||||||
|
* @phpstan-var \SplQueue<CompressBatchPromise>
|
||||||
|
*/
|
||||||
private $compressedQueue;
|
private $compressedQueue;
|
||||||
/** @var Compressor */
|
/** @var Compressor */
|
||||||
private $compressor;
|
private $compressor;
|
||||||
|
@ -49,7 +49,10 @@ class AsyncPool{
|
|||||||
/** @var int */
|
/** @var int */
|
||||||
private $workerMemoryLimit;
|
private $workerMemoryLimit;
|
||||||
|
|
||||||
/** @var \SplQueue[]|AsyncTask[][] */
|
/**
|
||||||
|
* @var \SplQueue[]|AsyncTask[][]
|
||||||
|
* @phpstan-var array<int, \SplQueue<AsyncTask>>
|
||||||
|
*/
|
||||||
private $taskQueues = [];
|
private $taskQueues = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,7 +36,10 @@ class TaskScheduler{
|
|||||||
/** @var bool */
|
/** @var bool */
|
||||||
private $enabled = true;
|
private $enabled = true;
|
||||||
|
|
||||||
/** @var ReversePriorityQueue<TaskHandler> */
|
/**
|
||||||
|
* @var ReversePriorityQueue
|
||||||
|
* @phpstan-var ReversePriorityQueue<int, TaskHandler>
|
||||||
|
*/
|
||||||
protected $queue;
|
protected $queue;
|
||||||
|
|
||||||
/** @var TaskHandler[] */
|
/** @var TaskHandler[] */
|
||||||
|
@ -23,11 +23,18 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\utils;
|
namespace pocketmine\utils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @phpstan-template TPriority
|
||||||
|
* @phpstan-template TValue
|
||||||
|
* @phpstan-extends \SplPriorityQueue<TPriority, TValue>
|
||||||
|
*/
|
||||||
class ReversePriorityQueue extends \SplPriorityQueue{
|
class ReversePriorityQueue extends \SplPriorityQueue{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param mixed $priority1
|
* @param mixed $priority1
|
||||||
* @param mixed $priority2
|
* @param mixed $priority2
|
||||||
|
* @phpstan-param TPriority $priority1
|
||||||
|
* @phpstan-param TPriority $priority2
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
|
@ -197,12 +197,18 @@ class World implements ChunkManager{
|
|||||||
/** @var Vector3[][] */
|
/** @var Vector3[][] */
|
||||||
private $changedBlocks = [];
|
private $changedBlocks = [];
|
||||||
|
|
||||||
/** @var ReversePriorityQueue */
|
/**
|
||||||
|
* @var ReversePriorityQueue
|
||||||
|
* @phpstan-var ReversePriorityQueue<int, Vector3>
|
||||||
|
*/
|
||||||
private $scheduledBlockUpdateQueue;
|
private $scheduledBlockUpdateQueue;
|
||||||
/** @var int[] */
|
/** @var int[] */
|
||||||
private $scheduledBlockUpdateQueueIndex = [];
|
private $scheduledBlockUpdateQueueIndex = [];
|
||||||
|
|
||||||
/** @var \SplQueue */
|
/**
|
||||||
|
* @var \SplQueue
|
||||||
|
* @phpstan-var \SplQueue<int>
|
||||||
|
*/
|
||||||
private $neighbourBlockUpdateQueue;
|
private $neighbourBlockUpdateQueue;
|
||||||
/** @var bool[] blockhash => dummy */
|
/** @var bool[] blockhash => dummy */
|
||||||
private $neighbourBlockUpdateQueueIndex = [];
|
private $neighbourBlockUpdateQueueIndex = [];
|
||||||
|
@ -42,7 +42,10 @@ abstract class LightUpdate{
|
|||||||
*/
|
*/
|
||||||
protected $updateNodes = [];
|
protected $updateNodes = [];
|
||||||
|
|
||||||
/** @var \SplQueue */
|
/**
|
||||||
|
* @var \SplQueue
|
||||||
|
* @phpstan-var \SplQueue<array{int, int, int}>
|
||||||
|
*/
|
||||||
protected $spreadQueue;
|
protected $spreadQueue;
|
||||||
/**
|
/**
|
||||||
* @var true[]
|
* @var true[]
|
||||||
@ -50,7 +53,10 @@ abstract class LightUpdate{
|
|||||||
*/
|
*/
|
||||||
protected $spreadVisited = [];
|
protected $spreadVisited = [];
|
||||||
|
|
||||||
/** @var \SplQueue */
|
/**
|
||||||
|
* @var \SplQueue
|
||||||
|
* @phpstan-var \SplQueue<array{int, int, int, int}>
|
||||||
|
*/
|
||||||
protected $removalQueue;
|
protected $removalQueue;
|
||||||
/**
|
/**
|
||||||
* @var true[]
|
* @var true[]
|
||||||
|
@ -751,34 +751,9 @@ parameters:
|
|||||||
path: ../../../src/resourcepacks/ZippedResourcePack.php
|
path: ../../../src/resourcepacks/ZippedResourcePack.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Cannot call method enqueue\\(\\) on array\\<pocketmine\\\\scheduler\\\\AsyncTask\\>\\|SplQueue\\.$#"
|
message: "#^Cannot call method getNextRun\\(\\) on array\\<string, int\\|pocketmine\\\\scheduler\\\\TaskHandler\\>\\|int\\|pocketmine\\\\scheduler\\\\TaskHandler\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
path: ../../../src/scheduler/AsyncPool.php
|
path: ../../../src/scheduler/TaskScheduler.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Cannot call method count\\(\\) on array\\<pocketmine\\\\scheduler\\\\AsyncTask\\>\\|SplQueue\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: ../../../src/scheduler/AsyncPool.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Method pocketmine\\\\scheduler\\\\AsyncPool\\:\\:selectWorker\\(\\) should return int but returns int\\|string\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: ../../../src/scheduler/AsyncPool.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Cannot call method isEmpty\\(\\) on array\\<pocketmine\\\\scheduler\\\\AsyncTask\\>\\|SplQueue\\.$#"
|
|
||||||
count: 3
|
|
||||||
path: ../../../src/scheduler/AsyncPool.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Cannot call method bottom\\(\\) on array\\<pocketmine\\\\scheduler\\\\AsyncTask\\>\\|SplQueue\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: ../../../src/scheduler/AsyncPool.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Cannot call method dequeue\\(\\) on array\\<pocketmine\\\\scheduler\\\\AsyncTask\\>\\|SplQueue\\.$#"
|
|
||||||
count: 2
|
|
||||||
path: ../../../src/scheduler/AsyncPool.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#2 \\$subject of function preg_match expects string, string\\|false given\\.$#"
|
message: "#^Parameter \\#2 \\$subject of function preg_match expects string, string\\|false given\\.$#"
|
||||||
@ -895,6 +870,16 @@ parameters:
|
|||||||
count: 1
|
count: 1
|
||||||
path: ../../../src/world/World.php
|
path: ../../../src/world/World.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Cannot access offset 'priority' on array\\('priority' \\=\\> int, 'data' \\=\\> pocketmine\\\\math\\\\Vector3\\)\\|int\\|pocketmine\\\\math\\\\Vector3\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: ../../../src/world/World.php
|
||||||
|
|
||||||
|
-
|
||||||
|
message: "#^Cannot access offset 'data' on array\\('priority' \\=\\> int, 'data' \\=\\> pocketmine\\\\math\\\\Vector3\\)\\|int\\|pocketmine\\\\math\\\\Vector3\\.$#"
|
||||||
|
count: 1
|
||||||
|
path: ../../../src/world/World.php
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Parameter \\#1 \\$x of static method pocketmine\\\\world\\\\World\\:\\:blockHash\\(\\) expects int, float\\|int given\\.$#"
|
message: "#^Parameter \\#1 \\$x of static method pocketmine\\\\world\\\\World\\:\\:blockHash\\(\\) expects int, float\\|int given\\.$#"
|
||||||
count: 3
|
count: 3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user