add some Generator generics for PHPStan

This commit is contained in:
Dylan K. Taylor 2020-01-29 16:38:50 +00:00
parent 2b402e525a
commit 640df1003c
2 changed files with 2 additions and 0 deletions

View File

@ -254,6 +254,7 @@ class CraftingManager{
* @param Item[] $outputs
*
* @return CraftingRecipe[]|\Generator
* @phpstan-return \Generator<int, CraftingRecipe, void, void>
*/
public function matchRecipeByOutputs(array $outputs) : \Generator{
//TODO: try to match special recipes before anything else (first they need to be implemented!)

View File

@ -91,6 +91,7 @@ class BatchPacket extends DataPacket{
/**
* @return \Generator
* @phpstan-return \Generator<int, string, void, void>
*/
public function getPackets(){
$stream = new NetworkBinaryStream($this->payload);