Skip to content

Commit 20a35be

Browse files
committed
revert accidentally committed code
1 parent cbce120 commit 20a35be

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

lib/Service/SynchronizationService.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ public function synchronize(
188188
force: $force,
189189
log: $log
190190
);
191-
191+
192192
$result = $processResult['result'];
193-
193+
194194
if ($processResult['targetId'] !== null) {
195195
$synchronizedTargetIds[] = $processResult['targetId'];
196196
}
@@ -845,12 +845,12 @@ private function processSyncContract(string $synchronizationId, array $subObject
845845
);
846846
}
847847

848-
// $this->synchronizationContractLogMapper->createFromArray([
849-
// 'synchronizationId' => $subContract->getSynchronizationId(),
850-
// 'synchronizationContractId' => $subContract->getId(),
851-
// 'target' => $subObjectData,
852-
// 'expires' => new DateTime('+1 day')
853-
// ]);
848+
$this->synchronizationContractLogMapper->createFromArray([
849+
'synchronizationId' => $subContract->getSynchronizationId(),
850+
'synchronizationContractId' => $subContract->getId(),
851+
'target' => $subObjectData,
852+
'expires' => new DateTime('+1 day')
853+
]);
854854
}
855855

856856
/**
@@ -2059,23 +2059,23 @@ private function xmlToArray(\SimpleXMLElement $xml): array
20592059
* @param bool $isTest Whether this is a test run
20602060
* @param bool $force Whether to force synchronization regardless of changes
20612061
* @param SynchronizationLog $log The synchronization log
2062-
*
2062+
*
20632063
* @return array Contains updated result data and the targetId ['result' => array, 'targetId' => string|null]
20642064
*/
20652065
private function processSynchronizationObject(
2066-
Synchronization $synchronization,
2067-
array $object,
2068-
array $result,
2069-
bool $isTest,
2070-
bool $force,
2066+
Synchronization $synchronization,
2067+
array $object,
2068+
array $result,
2069+
bool $isTest,
2070+
bool $force,
20712071
SynchronizationLog $log
20722072
): array {
20732073
// We can only deal with arrays (based on the source empty values or string might be returned)
20742074
if (is_array($object) === false) {
20752075
$result['objects']['invalid']++;
20762076
return ['result' => $result, 'targetId' => null];
20772077
}
2078-
2078+
20792079
$conditionsObject = $this->encodeArrayKeys($object, '.', '.');
20802080

20812081
// Check if object adheres to conditions.
@@ -2091,7 +2091,7 @@ private function processSynchronizationObject(
20912091

20922092
// Get the synchronization contract for this object
20932093
$synchronizationContract = $this->synchronizationContractMapper->findSyncContractByOriginId(
2094-
synchronizationId: $synchronization->id,
2094+
synchronizationId: $synchronization->id,
20952095
originId: $originId
20962096
);
20972097

@@ -2111,9 +2111,9 @@ private function processSynchronizationObject(
21112111
);
21122112

21132113
$synchronizationContract = $synchronizationContractResult['contract'];
2114-
$result['contracts'][] = isset($synchronizationContractResult['contract']['uuid']) ?
2114+
$result['contracts'][] = isset($synchronizationContractResult['contract']['uuid']) ?
21152115
$synchronizationContractResult['contract']['uuid'] : null;
2116-
$result['logs'][] = isset($synchronizationContractResult['log']['uuid']) ?
2116+
$result['logs'][] = isset($synchronizationContractResult['log']['uuid']) ?
21172117
$synchronizationContractResult['log']['uuid'] : null;
21182118
$result['objects']['created']++;
21192119
} else {
@@ -2128,15 +2128,15 @@ private function processSynchronizationObject(
21282128
);
21292129

21302130
$synchronizationContract = $synchronizationContractResult['contract'];
2131-
$result['contracts'][] = isset($synchronizationContractResult['contract']['uuid']) === true ?
2131+
$result['contracts'][] = isset($synchronizationContractResult['contract']['uuid']) === true ?
21322132
$synchronizationContractResult['contract']['uuid'] : null;
2133-
$result['logs'][] = isset($synchronizationContractResult['log']['uuid']) === true ?
2133+
$result['logs'][] = isset($synchronizationContractResult['log']['uuid']) === true ?
21342134
$synchronizationContractResult['log']['uuid'] : null;
21352135
$result['objects']['updated']++;
21362136
}
21372137

21382138
$targetId = $synchronizationContract['targetId'] ?? null;
2139-
2139+
21402140
return ['result' => $result, 'targetId' => $targetId];
21412141
}
21422142

0 commit comments

Comments
 (0)