aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2023-06-12 09:42:43 +0200
committerGitHub <noreply@github.com>2023-06-12 09:42:43 +0200
commitc93be182dc0172eed377ba70ce54cd7c83689764 (patch)
treebde4a8070112dec29b367caeb935424dfcb83186 /apps
parenta85831a59708491a01594e2c1aab930c49476570 (diff)
parent716a65946896de0ec9197c6cbebaf9b8c8060d6b (diff)
downloadnextcloud-server-c93be182dc0172eed377ba70ce54cd7c83689764.tar.gz
nextcloud-server-c93be182dc0172eed377ba70ce54cd7c83689764.zip
Merge pull request #38543 from fsamapoor/use_null_coalescing_operator
Uses "Null Coalescing Operator" to improve code readability.
Diffstat (limited to 'apps')
-rw-r--r--apps/settings/lib/Controller/AppSettingsController.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/settings/lib/Controller/AppSettingsController.php b/apps/settings/lib/Controller/AppSettingsController.php
index d0ed408df02..bc84e17535e 100644
--- a/apps/settings/lib/Controller/AppSettingsController.php
+++ b/apps/settings/lib/Controller/AppSettingsController.php
@@ -187,7 +187,7 @@ class AppSettingsController extends Controller {
$formattedCategories[] = [
'id' => $category['id'],
'ident' => $category['id'],
- 'displayName' => isset($category['translations'][$currentLanguage]['name']) ? $category['translations'][$currentLanguage]['name'] : $category['translations']['en']['name'],
+ 'displayName' => $category['translations'][$currentLanguage]['name'] ?? $category['translations']['en']['name'],
];
}
@@ -370,9 +370,9 @@ class AppSettingsController extends Controller {
$formattedApps[] = [
'id' => $app['id'],
- 'name' => isset($app['translations'][$currentLanguage]['name']) ? $app['translations'][$currentLanguage]['name'] : $app['translations']['en']['name'],
- 'description' => isset($app['translations'][$currentLanguage]['description']) ? $app['translations'][$currentLanguage]['description'] : $app['translations']['en']['description'],
- 'summary' => isset($app['translations'][$currentLanguage]['summary']) ? $app['translations'][$currentLanguage]['summary'] : $app['translations']['en']['summary'],
+ 'name' => $app['translations'][$currentLanguage]['name'] ?? $app['translations']['en']['name'],
+ 'description' => $app['translations'][$currentLanguage]['description'] ?? $app['translations']['en']['description'],
+ 'summary' => $app['translations'][$currentLanguage]['summary'] ?? $app['translations']['en']['summary'],
'license' => $app['releases'][0]['licenses'],
'author' => $authors,
'shipped' => false,