From 40981bae0aeb1075bfd4a341a369510c41929aae Mon Sep 17 00:00:00 2001 From: Arvids Godjuks Date: Sun, 2 Nov 2025 22:10:10 +0200 Subject: [PATCH 1/3] Change initialDelaySec and delaySec types to int When running in strict types, the `sleep($asyncOptions->delaySec);` in Client and ClientV2 result in deprication error being raised. I've converted the fields to int (setters already expect int) and set delaySec to 1 because it already was converted to that https://3v4l.org/F9Ir7 --- src/Input/PollingOptions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Input/PollingOptions.php b/src/Input/PollingOptions.php index 60e2c3e3..be7013ef 100644 --- a/src/Input/PollingOptions.php +++ b/src/Input/PollingOptions.php @@ -14,13 +14,13 @@ class PollingOptions { /** - * @var float Initial delay (in seconds) before attempting to poll a queue. + * @var int Initial delay (in seconds) before attempting to poll a queue. */ - public float $initialDelaySec; + public int $initialDelaySec; /** - * @var float Delay (in seconds) between successive attempts to poll a queue. + * @var int Delay (in seconds) between successive attempts to poll a queue. */ - public float $delaySec; + public int $delaySec; /** * @var integer Maximum number of retries for a queue. */ @@ -31,8 +31,8 @@ class PollingOptions */ public function __construct() { - $this->initialDelaySec = 2.0; - $this->delaySec = 1.5; + $this->initialDelaySec = 2; + $this->delaySec = 1; $this->maxRetries = 80; } From 37fb3edcc7c3d19ed60f8ba3731a47f17eff2750 Mon Sep 17 00:00:00 2001 From: Arvids Godjuks Date: Sun, 2 Nov 2025 22:11:48 +0200 Subject: [PATCH 2/3] Change delay constants to integer values Updated minimum delay constants to use integer values. --- src/Input/PollingOptions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Input/PollingOptions.php b/src/Input/PollingOptions.php index be7013ef..3d5f845b 100644 --- a/src/Input/PollingOptions.php +++ b/src/Input/PollingOptions.php @@ -5,8 +5,8 @@ use Mindee\Error\ErrorCode; use Mindee\Error\MindeeApiException; -const MINIMUM_INITIAL_DELAY_SECONDS = 1.0; -const MINIMUM_DELAY_SECONDS = 1.0; +const MINIMUM_INITIAL_DELAY_SECONDS = 1; +const MINIMUM_DELAY_SECONDS = 1; /** * Handles options tied to asynchronous parsing. From 653f2f8908b056cf343fedd036bc41aef7159675 Mon Sep 17 00:00:00 2001 From: Arvids Godjuks Date: Sun, 2 Nov 2025 22:14:01 +0200 Subject: [PATCH 3/3] Update PHPDoc types from 'int' to 'integer' --- src/Input/PollingOptions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Input/PollingOptions.php b/src/Input/PollingOptions.php index 3d5f845b..25dd38df 100644 --- a/src/Input/PollingOptions.php +++ b/src/Input/PollingOptions.php @@ -14,11 +14,11 @@ class PollingOptions { /** - * @var int Initial delay (in seconds) before attempting to poll a queue. + * @var integer Initial delay (in seconds) before attempting to poll a queue. */ public int $initialDelaySec; /** - * @var int Delay (in seconds) between successive attempts to poll a queue. + * @var integer Delay (in seconds) between successive attempts to poll a queue. */ public int $delaySec; /**