-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from getyoti/release/1.5.0
Release 1.5.0
- Loading branch information
Showing
29 changed files
with
1,362 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/DocScan/Request/Check/SandboxSupplementaryDocumentTextDataCheck.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yoti\Sandbox\DocScan\Request\Check; | ||
|
||
class SandboxSupplementaryDocumentTextDataCheck extends SandboxDocumentCheck | ||
{ | ||
} |
42 changes: 42 additions & 0 deletions
42
src/DocScan/Request/Check/SandboxSupplementaryDocumentTextDataCheckBuilder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yoti\Sandbox\DocScan\Request\Check; | ||
|
||
class SandboxSupplementaryDocumentTextDataCheckBuilder extends SandboxDocumentCheckBuilder | ||
{ | ||
/** | ||
* @var array<string, mixed>|null | ||
*/ | ||
private $documentFields; | ||
|
||
/** | ||
* @param string $key | ||
* @param mixed $value | ||
*/ | ||
public function withDocumentField(string $key, $value): self | ||
{ | ||
$this->documentFields[$key] = $value; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @param array<string, mixed> $documentFields | ||
* @return $this | ||
*/ | ||
public function withDocumentFields(array $documentFields): self | ||
{ | ||
$this->documentFields = $documentFields; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @return SandboxSupplementaryDocumentTextDataCheck | ||
*/ | ||
public function build(): SandboxCheck | ||
{ | ||
$result = new SandboxSupplementaryDocumentTextDataCheckResult($this->buildReport(), $this->documentFields); | ||
return new SandboxSupplementaryDocumentTextDataCheck($result, $this->documentFilter); | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
src/DocScan/Request/Check/SandboxSupplementaryDocumentTextDataCheckResult.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Yoti\Sandbox\DocScan\Request\Check; | ||
|
||
use Yoti\Sandbox\DocScan\Request\Check\Report\SandboxCheckReport; | ||
|
||
class SandboxSupplementaryDocumentTextDataCheckResult extends SandboxCheckResult | ||
{ | ||
|
||
/** | ||
* @var array<string, mixed>|null | ||
*/ | ||
private $documentFields; | ||
|
||
/** | ||
* @param SandboxCheckReport $report | ||
* @param array<string, mixed>|null $documentFields | ||
*/ | ||
public function __construct( | ||
SandboxCheckReport $report, | ||
?array $documentFields | ||
) { | ||
parent::__construct($report); | ||
$this->documentFields = $documentFields; | ||
} | ||
|
||
/** | ||
* @return \stdClass | ||
*/ | ||
public function jsonSerialize(): \stdClass | ||
{ | ||
$jsonData = parent::jsonSerialize(); | ||
|
||
if ($this->documentFields !== null) { | ||
$jsonData->document_fields = (object) $this->documentFields; | ||
} | ||
|
||
return $jsonData; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.