Skip to content

Commit

Permalink
fix: Correct the reserved CPU core phpdoc (#137)
Browse files Browse the repository at this point in the history
The value `0` is valid and allowed.
  • Loading branch information
theofidry authored Aug 1, 2024
1 parent c52b2dc commit c061a72
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/CpuCoreCounter.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ public function __construct(?array $finders = null)
}

/**
* @param positive-int $reservedCpus
* @param positive-int $limit
* @param float $loadLimitPerCore Limits the number of CPUs based on the system load
* average per core in a range of [0., 1.].
* @param float $systemLoadAverage The system load average. If not provided, it will be
* retrieved using `sys_getloadavg()` to check the load
* of the system in the past minute. Should be a positive
* float.
* @param positive-int|0 $reservedCpus
* @param positive-int $limit
* @param float $loadLimitPerCore Limits the number of CPUs based on the system load
* average per core in a range of [0., 1.].
* @param float $systemLoadAverage The system load average. If not provided, it will be
* retrieved using `sys_getloadavg()` to check the load
* of the system in the past minute. Should be a positive
* float.
*
* @see https://php.net/manual/en/function.sys-getloadavg.php
*/
Expand Down
4 changes: 2 additions & 2 deletions src/ParallelisationResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
final class ParallelisationResult
{
/**
* @var positive-int
* @var positive-int|0
*/
public $passedReservedCpus;

Expand Down Expand Up @@ -59,7 +59,7 @@ final class ParallelisationResult
public $availableCpus;

/**
* @param positive-int $passedReservedCpus
* @param positive-int|0 $passedReservedCpus
* @param positive-int|null $passedLimit
* @param positive-int $totalCoresCount
* @param positive-int $availableCpus
Expand Down

0 comments on commit c061a72

Please sign in to comment.