1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Updated return type of iterator_count and iterator_apply functions to 0|positive-int

This commit is contained in:
Ricardo Boss 2022-01-07 11:34:01 +01:00
parent 4080b0377c
commit dc0e82f6bc
2 changed files with 4 additions and 4 deletions

View File

@ -6571,8 +6571,8 @@ return [
'Iterator::next' => ['void'], 'Iterator::next' => ['void'],
'Iterator::rewind' => ['void'], 'Iterator::rewind' => ['void'],
'Iterator::valid' => ['bool'], 'Iterator::valid' => ['bool'],
'iterator_apply' => ['int', 'iterator'=>'Traversable', 'callback'=>'callable(mixed):bool', 'args='=>'array'], 'iterator_apply' => ['0|positive-int', 'iterator'=>'Traversable', 'callback'=>'callable(mixed):bool', 'args='=>'array'],
'iterator_count' => ['int', 'iterator'=>'Traversable'], 'iterator_count' => ['0|positive-int', 'iterator'=>'Traversable'],
'iterator_to_array' => ['array', 'iterator'=>'Traversable', 'preserve_keys='=>'bool'], 'iterator_to_array' => ['array', 'iterator'=>'Traversable', 'preserve_keys='=>'bool'],
'IteratorAggregate::getIterator' => ['Traversable'], 'IteratorAggregate::getIterator' => ['Traversable'],
'IteratorIterator::__construct' => ['void', 'it'=>'Traversable'], 'IteratorIterator::__construct' => ['void', 'it'=>'Traversable'],

View File

@ -12368,8 +12368,8 @@ return [
'is_writable' => ['bool', 'filename'=>'string'], 'is_writable' => ['bool', 'filename'=>'string'],
'is_writeable' => ['bool', 'filename'=>'string'], 'is_writeable' => ['bool', 'filename'=>'string'],
'isset' => ['bool', 'value'=>'mixed', '...rest='=>'mixed'], 'isset' => ['bool', 'value'=>'mixed', '...rest='=>'mixed'],
'iterator_apply' => ['int', 'iterator'=>'Traversable', 'callback'=>'callable(mixed):bool', 'args='=>'array'], 'iterator_apply' => ['0|positive-int', 'iterator'=>'Traversable', 'callback'=>'callable(mixed):bool', 'args='=>'array'],
'iterator_count' => ['int', 'iterator'=>'Traversable'], 'iterator_count' => ['0|positive-int', 'iterator'=>'Traversable'],
'iterator_to_array' => ['array', 'iterator'=>'Traversable', 'preserve_keys='=>'bool'], 'iterator_to_array' => ['array', 'iterator'=>'Traversable', 'preserve_keys='=>'bool'],
'java_last_exception_clear' => ['void'], 'java_last_exception_clear' => ['void'],
'java_last_exception_get' => ['object'], 'java_last_exception_get' => ['object'],