Skip to content

Commit 8e468be

Browse files
authored
Merge pull request #255 from getyoti/master
Master -> Development
2 parents 37957c3 + d0d5555 commit 8e468be

File tree

15 files changed

+168
-23
lines changed

15 files changed

+168
-23
lines changed

.github/workflows/tests.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ jobs:
5757

5858
- run: composer test
5959

60-
- run: composer lint
61-
6260
guzzle:
6361
name: Unit Tests With Guzzle 6 (php ${{ matrix.php-version }})
6462
runs-on: ubuntu-latest
@@ -87,8 +85,6 @@ jobs:
8785

8886
- run: composer test
8987

90-
- run: composer lint
91-
9288
protobuf:
9389
name: Unit Tests With Protobuf C Extension 3.13 (php ${{ matrix.php-version }})
9490
runs-on: ubuntu-latest
@@ -116,5 +112,3 @@ jobs:
116112

117113
- run: composer test
118114

119-
- run: composer lint
120-

examples/doc-scan/app/Http/Controllers/HomeController.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ public function show(Request $request, DocScanClient $client)
3434
->withAdverseMediaCategory()
3535
->build();
3636

37-
$watchlistAdvancedConfig = (new RequestedYotiAccountWatchlistAdvancedCaConfigBuilder())
38-
->withRemoveDeceased(true)
39-
->withShareUrl(false)
40-
->withSources(new RequestedSearchProfileSources('SOME_PROFILE'))
41-
->withMatchingStrategy(new RequestedFuzzyMatchingStrategy(0.5))
42-
->build();
43-
4437
$sessionSpec = (new SessionSpecificationBuilder())
4538
->withClientSessionTokenTtl(600)
4639
->withResourcesTtl(90000)
@@ -72,11 +65,6 @@ public function show(Request $request, DocScanClient $client)
7265
->withConfig($watchScreeningConfig)
7366
->build()
7467
)
75-
->withRequestedCheck(
76-
(new RequestedWatchlistAdvancedCaCheckBuilder())
77-
->withConfig($watchlistAdvancedConfig)
78-
->build()
79-
)
8068
->withRequestedTask(
8169
(new RequestedTextExtractionTaskBuilder())
8270
->withManualCheckAlways()

examples/doc-scan/composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"description": "Yoti SDK Profile Demo",
44
"license": "MIT",
55
"require": {
6-
"php": "^7.2.5",
6+
"php": "^8.0",
77
"fideloper/proxy": "^4.2",
88
"fruitcake/laravel-cors": "^1.0",
99
"guzzlehttp/guzzle": "^6.3",
10-
"laravel/framework": "^7.0",
11-
"laravel/tinker": "^2.0",
10+
"laravel/framework": "^8.0",
11+
"laravel/tinker": "^2.3.0",
1212
"yoti/yoti-php-sdk": "^3.0"
1313
},
1414
"require-dev": {

examples/docker/php.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM php:7-fpm-alpine
1+
FROM php:8-fpm-alpine
22

33
COPY php.ini /usr/local/etc/php/conf.d/php.ini

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ sonar.organization = getyoti
33

44
sonar.projectKey = getyoti:php
55
sonar.projectName = PHP SDK
6-
sonar.projectVersion = 3.6.0
6+
sonar.projectVersion = 3.7.0
77

88
sonar.language = php
99
sonar.sources=src

src/DocScan/DocScanClient.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ public function deleteMediaContent(string $sessionId, string $mediaId): void
129129
}
130130

131131
/**
132+
* Gets a list of supported documents.
133+
*
132134
* @param bool $isStrictlyLatin
133135
* @return SupportedDocumentsResponse
134136
* @throws Exception\DocScanException
@@ -139,6 +141,9 @@ public function getSupportedDocuments(bool $isStrictlyLatin = false): SupportedD
139141
}
140142

141143
/**
144+
* Creates a Face Capture resource, that will be linked using
145+
* the supplied requirement ID
146+
*
142147
* @param string $sessionId
143148
* @param CreateFaceCaptureResourcePayload $createFaceCaptureResourcePayload
144149
* @return Session\Retrieve\CreateFaceCaptureResourceResponse
@@ -152,6 +157,8 @@ public function createFaceCaptureResource(
152157
}
153158

154159
/**
160+
* Uploads an image to the specified Face Capture resource
161+
*
155162
* @param string $sessionId
156163
* @param string $resourceId
157164
* @param UploadFaceCaptureImagePayload $uploadFaceCaptureImagePayload
@@ -178,6 +185,8 @@ public function getSessionConfiguration(string $sessionId): SessionConfiguration
178185
}
179186

180187
/**
188+
* Sets the IBV instructions for the given session
189+
*
181190
* @throws Exception\DocScanException
182191
*/
183192
public function putIbvInstructions(string $sessionId, Instructions $instructions): void

src/DocScan/Session/Retrieve/Contracts/WatchlistAdvancedCaSearchConfigResponse.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,12 @@ public function getMatchingStrategy(): CaMatchingStrategyResponse
6262
{
6363
return $this->matchingStrategy;
6464
}
65+
66+
/**
67+
* @return string
68+
*/
69+
public function getType(): string
70+
{
71+
return $this->type;
72+
}
6573
}

src/Http/MultipartEntity.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ class MultipartEntity
1717
*/
1818
private $multipartData;
1919

20+
/**
21+
* This constructor is private, because of you have to create objects only by static method 'create'
22+
*/
2023
private function __construct()
2124
{
2225
}
@@ -62,4 +65,20 @@ public function createStream(): StreamInterface
6265
{
6366
return new MultipartStream($this->multipartData, $this->multipartBoundary);
6467
}
68+
69+
/**
70+
* @return string
71+
*/
72+
public function getMultipartBoundary(): string
73+
{
74+
return $this->multipartBoundary;
75+
}
76+
77+
/**
78+
* @return array[]
79+
*/
80+
public function getMultipartData(): array
81+
{
82+
return $this->multipartData;
83+
}
6584
}

tests/DocScan/Session/Create/Check/IssuingAuthoritySubCheckTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class IssuingAuthoritySubCheckTest extends TestCase
1515
* @test
1616
* @covers ::__construct
1717
* @covers ::isRequested
18+
* @covers ::getFilter
1819
* @covers \Yoti\DocScan\Session\Create\Check\IssuingAuthoritySubCheckBuilder::withDocumentFilter
1920
* @covers \Yoti\DocScan\Session\Create\Check\IssuingAuthoritySubCheckBuilder::withRequested
2021
* @covers \Yoti\DocScan\Session\Create\Check\IssuingAuthoritySubCheckBuilder::build
@@ -30,5 +31,6 @@ public function withRequestedAndDocumentFilterShouldSetTheValueCorrectly()
3031

3132
$this->assertTrue($result->isRequested());
3233
$this->assertInstanceOf(DocumentFilter::class, $result->getFilter());
34+
$this->assertEquals($documentFilterMock, $result->getFilter());
3335
}
3436
}

tests/DocScan/Session/Retrieve/Configuration/Capture/CaptureResponseTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ public function shouldFilterRequiredSources(): void
9797
$result = new CaptureResponse($input);
9898

9999
$this->assertCount(4, $result->getRequiredResources());
100+
$this->assertCount(2, $result->getDocumentResourceRequirements());
100101
$this->assertCount(1, $result->getIdDocumentResourceRequirements());
102+
$this->assertCount(1, $result->getLivenessResourceRequirements());
101103
$this->assertCount(1, $result->getSupplementaryResourceRequirements());
102104
$this->assertCount(1, $result->getZoomLivenessResourceRequirements());
103105
$this->assertCount(1, $result->getFaceCaptureResourceRequirements());

0 commit comments

Comments
 (0)