1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-11 16:59:45 +01:00

Merge pull request #6614 from ishanvyas22/fiber-stubs

feat: Add Fiber stubs
This commit is contained in:
orklah 2021-10-09 10:00:09 +02:00 committed by GitHub
commit 3f6ba705f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View File

@ -3374,6 +3374,18 @@ return [
'func_num_args' => ['int'],
'function_exists' => ['bool', 'function'=>'string'],
'fwrite' => ['int|false', 'stream'=>'resource', 'data'=>'string', 'length='=>'int'],
'Fiber::__construct' => ['void', 'callback'=>'callable'],
'Fiber::start' => ['mixed', '...args'=>'mixed'],
'Fiber::resume' => ['mixed', 'value='=>'null|mixed'],
'Fiber::throw' => ['mixed', 'exception'=>'Throwable'],
'Fiber::isStarted' => ['bool'],
'Fiber::isSuspended' => ['bool'],
'Fiber::isRunning' => ['bool'],
'Fiber::isTerminated' => ['bool'],
'Fiber::getReturn' => ['mixed'],
'Fiber::getCurrent' => ['?self'],
'Fiber::suspend' => ['mixed', 'value='=>'null|mixed'],
'FiberError::__construct' => ['void'],
'gc_collect_cycles' => ['int'],
'gc_disable' => ['void'],
'gc_enable' => ['void'],

View File

@ -24,6 +24,18 @@ return [
'mysqli_fetch_column' => ['null|int|float|string|false', 'result'=>'mysqli_result', 'column='=>'int'],
'mysqli_result::fetch_column' => ['null|int|float|string|false', 'column='=>'int'],
'CURLStringFile::__construct' => ['void', 'data'=>'string', 'postname'=>'string', 'mime='=>'string'],
'Fiber::__construct' => ['void', 'callback'=>'callable'],
'Fiber::start' => ['mixed', '...args'=>'mixed'],
'Fiber::resume' => ['mixed', 'value='=>'null|mixed'],
'Fiber::throw' => ['mixed', 'exception'=>'Throwable'],
'Fiber::isStarted' => ['bool'],
'Fiber::isSuspended' => ['bool'],
'Fiber::isRunning' => ['bool'],
'Fiber::isTerminated' => ['bool'],
'Fiber::getReturn' => ['mixed'],
'Fiber::getCurrent' => ['?self'],
'Fiber::suspend' => ['mixed', 'value='=>'null|mixed'],
'FiberError::__construct' => ['void'],
],
'changed' => [