0
0
mirror of https://github.com/pmmp/PocketMine-MP.git synced 2024-11-24 07:26:13 +00:00
PocketMine-MP/tests/phpstan/stubs/pmmpthread.stub
2023-05-20 01:29:26 +01:00

36 lines
718 B
Plaintext

<?php
namespace pmmp\thread;
/**
* @implements \IteratorAggregate<array-key, mixed>
*/
abstract class ThreadSafe implements \IteratorAggregate{
/**
* @template TReturn
* @param \Closure() : TReturn $function
* @param mixed ...$args
* @return TReturn
*/
public function synchronized(\Closure $function, mixed ...$args) : mixed{}
}
/**
* @template TKey of array-key
* @template TValue
* @implements \ArrayAccess<TKey, TValue>
*/
final class ThreadSafeArray extends ThreadSafe implements \Countable, \ArrayAccess{
/**
* @return TValue|null
*/
public function pop() : mixed{}
/**
* @return TValue|null
*/
public function shift() : mixed{}
}