Skip to content

Commit bbdefef

Browse files
authored
SDK-2213 Rename retries as attempts (#310)
1 parent db27d6b commit bbdefef

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/DocScan/Session/Create/SdkConfigBuilder.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,21 @@ public function withIdDocumentTextExtractionReclassificationRetries(int $reclass
169169
return $this;
170170
}
171171

172+
/**
173+
* @deprecated from 4.2.0, @see withIdDocumentTextExtractionGenericAttempts
174+
*/
175+
public function withIdDocumentTextExtractionGenericRetries(int $genericRetries)
176+
{
177+
}
178+
172179
/**
173180
* Allows configuring the number of 'Generic' attempts permitted for text extraction on an ID document
174181
*
175182
* The number of generic retries
176183
* @param int $genericRetries
177184
* @return $this
178185
*/
179-
public function withIdDocumentTextExtractionGenericRetries(int $genericRetries): self
186+
public function withIdDocumentTextExtractionGenericAttempts(int $genericRetries): self
180187
{
181188
$this->withIdDocumentTextExtractionCategoryRetries(Constants::GENERIC, $genericRetries);
182189
return $this;

tests/DocScan/Session/Create/SdkConfigBuilderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public function attemptsConfigurationShouldResetSameValueWithRepeatedCalls(): vo
237237
* @covers ::build
238238
* @covers ::withIdDocumentTextExtractionCategoryRetries
239239
* @covers ::withIdDocumentTextExtractionReclassificationRetries
240-
* @covers ::withIdDocumentTextExtractionGenericRetries
240+
* @covers ::withIdDocumentTextExtractionGenericAttempts
241241
* @covers \Yoti\DocScan\Session\Create\SdkConfig::getAttemptsConfiguration
242242
* @covers \Yoti\DocScan\Session\Create\SdkConfig::__construct
243243
* @covers \Yoti\DocScan\Session\Create\AttemptsConfiguration::__construct
@@ -250,7 +250,7 @@ public function attemptsConfigurationShouldAllowMultipleCategories(): void
250250

251251
$sdkConfig = (new SdkConfigBuilder())
252252
->withIdDocumentTextExtractionReclassificationRetries($numberOfReclassificationRetries)
253-
->withIdDocumentTextExtractionGenericRetries($numberOfGenericRetries)
253+
->withIdDocumentTextExtractionGenericAttempts($numberOfGenericRetries)
254254
->withIdDocumentTextExtractionCategoryRetries(self::SOME_CATEGORY, self::SOME_NUMBER_RETRIES)
255255
->build();
256256

0 commit comments

Comments
 (0)