mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
added some callable prototypes for phpstan
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user