Skip to content

Commit

Permalink
More precise array_chunk signature
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Jan 31, 2022
1 parent a1abfc3 commit c013219
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/functionMap.php
Expand Up @@ -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<positive-int>', 'input'=>'array'],
Expand Down
4 changes: 3 additions & 1 deletion src/Parallel/Scheduler.php
Expand Up @@ -10,7 +10,9 @@

class Scheduler
{

/**
* @param positive-int $jobSize
*/
public function __construct(
private int $jobSize,
private int $maximumNumberOfProcesses,
Expand Down
1 change: 1 addition & 0 deletions tests/PHPStan/Parallel/SchedulerTest.php
Expand Up @@ -72,6 +72,7 @@ public function dataSchedule(): array

/**
* @dataProvider dataSchedule
* @param positive-int $jobSize
* @param 0|positive-int $numberOfFiles
* @param array<int> $expectedJobSizes
*/
Expand Down

0 comments on commit c013219

Please sign in to comment.