Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
60.87% |
14 / 23 |
|
50.00% |
5 / 10 |
CRAP | |
0.00% |
0 / 1 |
| ResourceSyncDTO | |
60.87% |
14 / 23 |
|
50.00% |
5 / 10 |
15.99 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
10 / 10 |
|
100.00% |
1 / 1 |
1 | |||
| getMetadata | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 | |||
| jsonSerialize | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getResourceId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getFileSystemId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getTestUri | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| isDeleted | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getTenantId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getFirstTenantId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getMaxTries | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace oat\taoDeliveryRdf\model\DataStore; |
| 4 | |
| 5 | use JsonSerializable; |
| 6 | |
| 7 | class ResourceSyncDTO implements JsonSerializable |
| 8 | { |
| 9 | private string $resourceId; |
| 10 | private string $fileSystemId; |
| 11 | private ?string $testUri; |
| 12 | private bool $isDeleted; |
| 13 | private ?string $tenantId; |
| 14 | private ?string $firstTenantId; |
| 15 | private int $maxTries; |
| 16 | private array $deliveryMetaData; |
| 17 | private array $testMetaData; |
| 18 | private array $itemMetaData; |
| 19 | |
| 20 | public function __construct( |
| 21 | string $resourceId, |
| 22 | string $fileSystemId, |
| 23 | ?string $testUri = null, |
| 24 | bool $isDeleted = false, |
| 25 | ?string $tenantId = null, |
| 26 | ?string $firstTenantId = null, |
| 27 | int $maxTries = 10, |
| 28 | array $deliveryMetaData = [], |
| 29 | array $testMetaData = [], |
| 30 | array $itemMetaData = [] |
| 31 | ) { |
| 32 | $this->resourceId = $resourceId; |
| 33 | $this->fileSystemId = $fileSystemId; |
| 34 | $this->testUri = $testUri; |
| 35 | $this->isDeleted = $isDeleted; |
| 36 | $this->tenantId = $tenantId; |
| 37 | $this->firstTenantId = $firstTenantId; |
| 38 | $this->maxTries = $maxTries; |
| 39 | $this->deliveryMetaData = $deliveryMetaData; |
| 40 | $this->testMetaData = $testMetaData; |
| 41 | $this->itemMetaData = $itemMetaData; |
| 42 | } |
| 43 | |
| 44 | public function getMetadata(): array |
| 45 | { |
| 46 | return [ |
| 47 | 'deliveryMetaData' => $this->deliveryMetaData, |
| 48 | 'testMetaData' => $this->testMetaData, |
| 49 | 'itemMetaData' => $this->itemMetaData |
| 50 | ]; |
| 51 | } |
| 52 | |
| 53 | public function jsonSerialize() |
| 54 | { |
| 55 | return get_object_vars($this); |
| 56 | } |
| 57 | |
| 58 | //------------------GENERATED--------------------- |
| 59 | |
| 60 | public function getResourceId(): string |
| 61 | { |
| 62 | return $this->resourceId; |
| 63 | } |
| 64 | |
| 65 | public function getFileSystemId(): string |
| 66 | { |
| 67 | return $this->fileSystemId; |
| 68 | } |
| 69 | |
| 70 | public function getTestUri(): ?string |
| 71 | { |
| 72 | return $this->testUri; |
| 73 | } |
| 74 | |
| 75 | public function isDeleted(): bool |
| 76 | { |
| 77 | return $this->isDeleted; |
| 78 | } |
| 79 | |
| 80 | public function getTenantId(): ?string |
| 81 | { |
| 82 | return $this->tenantId; |
| 83 | } |
| 84 | |
| 85 | public function getFirstTenantId(): ?string |
| 86 | { |
| 87 | return $this->firstTenantId; |
| 88 | } |
| 89 | |
| 90 | public function getMaxTries(): int |
| 91 | { |
| 92 | return $this->maxTries; |
| 93 | } |
| 94 | } |