Skip to content

Commit 375d3b6

Browse files
inline variables (WP-967)
1 parent ad248d7 commit 375d3b6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

inc/Smartling/WP/Controller/TestRunController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,11 @@ public function testRun($data): void
187187
if (!$post instanceof \WP_Post) {
188188
wp_send_json_error('Unable to get posts');
189189
}
190-
$originalRefs = $this->contentRelationDiscoveryService->getRelations($post->post_type, $post->ID, [$targetBlogId])->getOriginalReferences();
191-
$transformedRefs = [$targetBlogId => $originalRefs];
192190
$this->contentRelationDiscoveryService->createSubmissions(new UserTranslationRequest(
193191
$post->ID,
194192
$post->post_type,
195-
$transformedRefs,
193+
[$targetBlogId => $this->contentRelationDiscoveryService
194+
->getRelations($post->post_type, $post->ID, [$targetBlogId])->getOriginalReferences()],
196195
[$targetBlogId],
197196
new JobInformation($job->getJobUid(), true, $job->getJobName(), 'Test run job', '', 'UTC'),
198197
[],

0 commit comments

Comments
 (0)