From 8f917a8c86ea7bb9e0e73b0d4a5b8a8336a12215 Mon Sep 17 00:00:00 2001 From: Tomasz Kryszan Date: Mon, 18 Sep 2023 08:54:39 +0200 Subject: [PATCH] Fixed code style --- src/lib/Permission/LimitationResolver.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/Permission/LimitationResolver.php b/src/lib/Permission/LimitationResolver.php index 7fba67ed8a..dd1ceadae6 100644 --- a/src/lib/Permission/LimitationResolver.php +++ b/src/lib/Permission/LimitationResolver.php @@ -96,13 +96,16 @@ public function getLanguageLimitations( array $targets = [] ): array { $languages = !empty($languages) ? $languages : $this->languageService->loadLanguages(); + $versionBuilder = new VersionBuilder(); + $versionBuilder->translateToAnyLanguageOf($this->getActiveLanguageCodes($languages)); + $lookupLimitations = $this->permissionResolver->lookupLimitations( 'content', $function, $valueObject, array_merge( $targets, - [(new VersionBuilder())->translateToAnyLanguageOf($this->getActiveLanguageCodes($languages))->build()] + [$versionBuilder->build()] ), [Limitation::LANGUAGE] );