From c061a7256d635cc9e6fa9ee6e938a242e6d994ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Thu, 1 Aug 2024 21:58:12 +0200 Subject: [PATCH] fix: Correct the reserved CPU core phpdoc (#137) The value `0` is valid and allowed. --- src/CpuCoreCounter.php | 16 ++++++++-------- src/ParallelisationResult.php | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/CpuCoreCounter.php b/src/CpuCoreCounter.php index 3ad7f70..857594c 100644 --- a/src/CpuCoreCounter.php +++ b/src/CpuCoreCounter.php @@ -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 */ diff --git a/src/ParallelisationResult.php b/src/ParallelisationResult.php index 3ec7a7e..1db52dc 100644 --- a/src/ParallelisationResult.php +++ b/src/ParallelisationResult.php @@ -19,7 +19,7 @@ final class ParallelisationResult { /** - * @var positive-int + * @var positive-int|0 */ public $passedReservedCpus; @@ -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