-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathRequestedTextExtractionTaskConfig.php
More file actions
87 lines (76 loc) · 2.18 KB
/
Copy pathRequestedTextExtractionTaskConfig.php
File metadata and controls
87 lines (76 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
declare(strict_types=1);
namespace Yoti\DocScan\Session\Create\Task;
use stdClass;
use Yoti\Util\Json;
class RequestedTextExtractionTaskConfig implements RequestedTaskConfigInterface
{
/**
* @var string
*/
private $manualCheck;
/**
* @var string|null
*/
private $chipData;
/**
* @var bool|null
*/
private $createExpandedDocumentFields;
/**
* Constructor.
*
* @param string $manualCheck // Consider adding type hints for clarity and type safety.
* @param string|null $chipData // Consider adding type hints for clarity and type safety.
* @param bool|null $createExpandedDocumentFields // Consider adding type hints for clarity and type safety.
*/
public function __construct(
string $manualCheck,
?string $chipData = null,
?bool $createExpandedDocumentFields = false
) {
$this->manualCheck = $manualCheck;
$this->chipData = $chipData;
$this->createExpandedDocumentFields = $createExpandedDocumentFields;
}
/**
* Serializes the object to JSON.
*
* @return stdClass
*/
public function jsonSerialize(): stdClass // Ensure consistency in return types nullability.
{
return (object) Json::withoutNullValues([
'manual_check' => $this->getManualCheck(),
'chip_data' => $this->getChipData(),
'create_expanded_document_fields' => $this->getCreateExpandedDocumentFields(),
]);
}
/**
* Get the manual check value.
*
* @return string
*/
public function getManualCheck(): string
{
return $this->manualCheck;
}
/**
* Get the chip data.
*
* @return string|null
*/
public function getChipData(): ?string // Ensure consistency in return types nullability.
{
return $this->chipData;
}
/**
* Get the value of create expanded document fields.
*
* @return bool|null
*/
public function getCreateExpandedDocumentFields(): ?bool // Ensure consistency in return types nullability.
{
return $this->createExpandedDocumentFields;
}
}