From a7a5711312514913355ec82eaf1676f4ee8433ce Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sun, 5 Apr 2026 12:27:59 +0200 Subject: [PATCH 1/2] use int masks --- src/Curl/Concurrency.php | 6 +++--- src/Header/Timeout.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Curl/Concurrency.php b/src/Curl/Concurrency.php index 0b7db21..4869765 100644 --- a/src/Curl/Concurrency.php +++ b/src/Curl/Concurrency.php @@ -26,13 +26,13 @@ final class Concurrency private Sequence $scheduled; /** @var \WeakMap> */ private \WeakMap $finished; - /** @var ?positive-int */ + /** @var ?int<1, max> */ private ?int $maxConcurrency; /** * @psalm-mutation-free * - * @param ?positive-int $maxConcurrency + * @param ?int<1, max> $maxConcurrency */ private function __construct(?int $maxConcurrency = null) { @@ -45,7 +45,7 @@ private function __construct(?int $maxConcurrency = null) /** * @psalm-mutation-free * - * @param ?positive-int $maxConcurrency + * @param ?int<1, max> $maxConcurrency */ public static function new(?int $maxConcurrency = null): self { diff --git a/src/Header/Timeout.php b/src/Header/Timeout.php index ae5729c..69bc292 100644 --- a/src/Header/Timeout.php +++ b/src/Header/Timeout.php @@ -17,7 +17,7 @@ final class Timeout implements Custom { /** - * @param positive-int $seconds + * @param int<1, max> $seconds */ private function __construct( private int $seconds, @@ -27,7 +27,7 @@ private function __construct( /** * @psalm-pure * - * @param positive-int $seconds + * @param int<1, max> $seconds */ public static function of(int $seconds): self { @@ -35,7 +35,7 @@ public static function of(int $seconds): self } /** - * @return positive-int + * @return int<1, max> */ public function seconds(): int { From b5733831acce7f5b5508d70dff7780c17ed1226c Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sun, 5 Apr 2026 12:29:54 +0200 Subject: [PATCH 2/2] fix test --- tests/CurlTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CurlTest.php b/tests/CurlTest.php index a5d8a66..4c1fd70 100644 --- a/tests/CurlTest.php +++ b/tests/CurlTest.php @@ -173,7 +173,7 @@ public function testResponseBody() $license = <<