0
0
mirror of https://github.com/pmmp/PocketMine-MP.git synced 2025-02-24 16:38:52 +00:00
PocketMine-MP/tests/phpstan/stubs/pmmpthread.stub
Dylan K. Taylor e0630fbb25 pmmpthread support
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{}
}