Bug report
Code like this:
/**
* @return Entity[]
*/
public function getSavableEntities() : array{
return array_filter($this->entities, function(Entity $entity) : bool{ return $entity->canSaveWithChunk() and !$entity->isClosed(); });
}
fails with:
------ ----------------------------------------------------------------------------------------------
Line src/pocketmine/level/format/Chunk.php
------ ----------------------------------------------------------------------------------------------
644 Parameter #2 $callback of function array_filter expects (callable(mixed, mixed): bool)|null,
Closure(pocketmine\entity\Entity): bool given.
------ ----------------------------------------------------------------------------------------------
Because the reflection layer is unaware of the "genericness".
Code snippet that reproduces the problem
checkExplicitMixed not yet supported on phpstan.org
Expected output
No errors