added some callable prototypes for phpstan

This commit is contained in:
Dylan K. Taylor
2020-01-29 19:56:16 +00:00
parent 68bea6d4aa
commit 5c4487c980
10 changed files with 64 additions and 7 deletions

View File

@ -45,7 +45,10 @@ class SubChunkIteratorManager{
/** @var int */
protected $currentZ;
/** @var \Closure|null */
/**
* @var \Closure|null
* @phpstan-var (\Closure() : void)|null
*/
private $onSubChunkChangeFunc = null;
public function __construct(ChunkManager $world){
@ -83,6 +86,9 @@ class SubChunkIteratorManager{
return true;
}
/**
* @phpstan-param \Closure() : void $callback
*/
public function onSubChunkChange(\Closure $callback) : void{
Utils::validateCallableSignature(function(){}, $callback);
$this->onSubChunkChangeFunc = $callback;