Skip to content

Commit

Permalink
fix: Coding Standards
Browse files Browse the repository at this point in the history
  • Loading branch information
Nattfarinn committed Feb 26, 2021
1 parent e05b17a commit 3c28c9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/bundle/Controller/ContentEditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function proxyTranslateAction(
return $this->redirectToRoute('ezplatform.content.translate', [
'contentId' => $contentId,
'fromLanguageCode' => $fromLanguageCode,
'toLanguageCode' => $toLanguageCode
'toLanguageCode' => $toLanguageCode,
]);
}

Expand Down
6 changes: 3 additions & 3 deletions src/lib/EventListener/ContentProxyCreateDraftListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function translate(ContentProxyTranslateEvent $event): void
$content = $this->contentService->loadContent(
$event->getContentId(),
[
$event->getFromLanguageCode()
$event->getFromLanguageCode(),
]
);

Expand Down Expand Up @@ -143,11 +143,11 @@ private function getTranslatedContentFields(Content $content, string $languageCo
{
$contentType = $content->getContentType();

$translatableFields = array_filter($content->getFields(), static function(Field $field) use ($contentType): bool {
$translatableFields = array_filter($content->getFields(), static function (Field $field) use ($contentType): bool {
return $contentType->getFieldDefinition($field->fieldDefIdentifier)->isTranslatable;
});

return array_map(static function(Field $field) use ($languageCode): Field {
return array_map(static function (Field $field) use ($languageCode): Field {
return new Field([
'value' => $field->value,
'fieldDefIdentifier' => $field->fieldDefIdentifier,
Expand Down

0 comments on commit 3c28c9e

Please sign in to comment.