diff --git a/resources/functionMap.php b/resources/functionMap.php index d877e89299..03b33d82c0 100644 --- a/resources/functionMap.php +++ b/resources/functionMap.php @@ -259,7 +259,7 @@ 'AppendIterator::rewind' => ['void'], 'AppendIterator::valid' => ['bool'], 'array_change_key_case' => ['array', 'input'=>'array', 'case='=>'int'], -'array_chunk' => ['array[]', 'input'=>'array', 'size'=>'int', 'preserve_keys='=>'bool'], +'array_chunk' => ['array[]', 'input'=>'array', 'size'=>'positive-int', 'preserve_keys='=>'bool'], 'array_column' => ['array', 'array'=>'array', 'column_key'=>'mixed', 'index_key='=>'mixed'], 'array_combine' => ['array|false', 'keys'=>'array', 'values'=>'array'], 'array_count_values' => ['array', 'input'=>'array'], diff --git a/src/Parallel/Scheduler.php b/src/Parallel/Scheduler.php index a9cf735313..1ab1ce6666 100644 --- a/src/Parallel/Scheduler.php +++ b/src/Parallel/Scheduler.php @@ -10,7 +10,9 @@ class Scheduler { - + /** + * @param positive-int $jobSize + */ public function __construct( private int $jobSize, private int $maximumNumberOfProcesses, diff --git a/tests/PHPStan/Parallel/SchedulerTest.php b/tests/PHPStan/Parallel/SchedulerTest.php index 21b0e29843..0d63fc1380 100644 --- a/tests/PHPStan/Parallel/SchedulerTest.php +++ b/tests/PHPStan/Parallel/SchedulerTest.php @@ -72,6 +72,7 @@ public function dataSchedule(): array /** * @dataProvider dataSchedule + * @param positive-int $jobSize * @param 0|positive-int $numberOfFiles * @param array $expectedJobSizes */