From 6b05dc633ebe95f2335526a4a212e0233ec85212 Mon Sep 17 00:00:00 2001 From: XenialDan Date: Wed, 23 Dec 2020 22:27:21 +0100 Subject: [PATCH] PhpStorm does not know it should import Position in phpstan parameters --- .../MagicWE2/clipboard/RevertClipboard.php | 4 ++-- src/xenialdan/MagicWE2/task/AsyncFillTask.php | 2 +- src/xenialdan/MagicWE2/task/AsyncPasteTask.php | 2 +- .../MagicWE2/task/AsyncReplaceTask.php | 18 +++++++++--------- .../MagicWE2/task/AsyncRevertTask.php | 4 ++-- src/xenialdan/MagicWE2/tool/Flood.php | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/xenialdan/MagicWE2/clipboard/RevertClipboard.php b/src/xenialdan/MagicWE2/clipboard/RevertClipboard.php index 8d90b41e..558bfa92 100644 --- a/src/xenialdan/MagicWE2/clipboard/RevertClipboard.php +++ b/src/xenialdan/MagicWE2/clipboard/RevertClipboard.php @@ -16,7 +16,7 @@ class RevertClipboard extends Clipboard public $chunks = []; /** * @var array[] - * @phpstan-var array + * @phpstan-var array */ public $blocksAfter; @@ -25,7 +25,7 @@ class RevertClipboard extends Clipboard * @param int $worldId * @param Chunk[] $chunks * @param array[] $blocksAfter //CHANGED AS HACK - * @phpstan-param array $blocksAfter + * @phpstan-param array $blocksAfter */ public function __construct(int $worldId, array $chunks = [], array $blocksAfter = []) { diff --git a/src/xenialdan/MagicWE2/task/AsyncFillTask.php b/src/xenialdan/MagicWE2/task/AsyncFillTask.php index 585fd47f..1015afde 100644 --- a/src/xenialdan/MagicWE2/task/AsyncFillTask.php +++ b/src/xenialdan/MagicWE2/task/AsyncFillTask.php @@ -96,7 +96,7 @@ public function onRun(): void * @param Block[] $newBlocks * @param null|int $changed * @return Generator|array[] - * @phpstan-return Generator + * @phpstan-return Generator * @throws Exception */ private function execute(Selection $selection, AsyncChunkManager $manager, array $newBlocks, ?int &$changed): Generator diff --git a/src/xenialdan/MagicWE2/task/AsyncPasteTask.php b/src/xenialdan/MagicWE2/task/AsyncPasteTask.php index 2235119f..04ee1638 100644 --- a/src/xenialdan/MagicWE2/task/AsyncPasteTask.php +++ b/src/xenialdan/MagicWE2/task/AsyncPasteTask.php @@ -91,7 +91,7 @@ public function onRun(): void * @param SingleClipboard $clipboard * @param null|int $changed * @return Generator|array[] - * @phpstan-return Generator + * @phpstan-return Generator * @throws InvalidArgumentException */ private function execute(Selection $selection, AsyncChunkManager $manager, SingleClipboard $clipboard, ?int &$changed): Generator diff --git a/src/xenialdan/MagicWE2/task/AsyncReplaceTask.php b/src/xenialdan/MagicWE2/task/AsyncReplaceTask.php index 8e78a9c5..a99b32a2 100644 --- a/src/xenialdan/MagicWE2/task/AsyncReplaceTask.php +++ b/src/xenialdan/MagicWE2/task/AsyncReplaceTask.php @@ -91,15 +91,15 @@ public function onRun(): void } /** - * @param Selection $selection - * @param AsyncChunkManager $manager - * @param array $replaceBlocks - * @param Block[] $newBlocks - * @param null|int $changed - * @return Generator|array[] - * @phpstan-return Generator - * @throws Exception - */ + * @param Selection $selection + * @param AsyncChunkManager $manager + * @param array $replaceBlocks + * @param Block[] $newBlocks + * @param null|int $changed + * @return Generator|array[] + * @phpstan-return Generator + * @throws Exception + */ private function execute(Selection $selection, AsyncChunkManager $manager, array $replaceBlocks, array $newBlocks, ?int &$changed): Generator { $blockCount = $selection->getShape()->getTotalCount(); diff --git a/src/xenialdan/MagicWE2/task/AsyncRevertTask.php b/src/xenialdan/MagicWE2/task/AsyncRevertTask.php index d3f8a7d9..399083ea 100644 --- a/src/xenialdan/MagicWE2/task/AsyncRevertTask.php +++ b/src/xenialdan/MagicWE2/task/AsyncRevertTask.php @@ -67,7 +67,7 @@ public function onRun(): void * @param AsyncChunkManager $manager * @param RevertClipboard $clipboard * @return Generator|array[] - * @phpstan-return Generator + * @phpstan-return Generator * @throws InvalidArgumentException */ private function undoChunks(AsyncChunkManager $manager, RevertClipboard $clipboard): Generator @@ -89,7 +89,7 @@ private function undoChunks(AsyncChunkManager $manager, RevertClipboard $clipboa * @param AsyncChunkManager $manager * @param RevertClipboard $clipboard * @return Generator|array[] - * @phpstan-return Generator + * @phpstan-return Generator * @throws InvalidArgumentException */ private function redoChunks(AsyncChunkManager $manager, RevertClipboard $clipboard): Generator diff --git a/src/xenialdan/MagicWE2/tool/Flood.php b/src/xenialdan/MagicWE2/tool/Flood.php index f3122dfa..c6ba3104 100644 --- a/src/xenialdan/MagicWE2/tool/Flood.php +++ b/src/xenialdan/MagicWE2/tool/Flood.php @@ -172,7 +172,7 @@ private function getCenter(): Vector3 /** * Creates a chunk manager used for async editing * @param Chunk[] $chunks - * @phpstan-param array + * @phpstan-param array $chunks * @return AsyncChunkManager */ public static function getChunkManager(array $chunks): AsyncChunkManager