diff options
-rw-r--r-- | apps/theming/lib/Controller/ThemingController.php | 2 | ||||
-rw-r--r-- | apps/theming/lib/Service/ThemesService.php | 4 | ||||
-rw-r--r-- | apps/theming/lib/Themes/DefaultTheme.php | 1 | ||||
-rw-r--r-- | apps/theming/lib/Util.php | 10 | ||||
-rw-r--r-- | apps/theming/src/components/ItemPreview.vue | 2 | ||||
-rw-r--r-- | build/psalm-baseline.xml | 5 | ||||
-rw-r--r-- | core/src/views/UnifiedSearch.vue | 8 | ||||
-rw-r--r-- | core/templates/layout.user.php | 4 |
8 files changed, 20 insertions, 16 deletions
diff --git a/apps/theming/lib/Controller/ThemingController.php b/apps/theming/lib/Controller/ThemingController.php index ff30e27f721..94deb2e7376 100644 --- a/apps/theming/lib/Controller/ThemingController.php +++ b/apps/theming/lib/Controller/ThemingController.php @@ -308,7 +308,7 @@ class ThemingController extends Controller { * @NoSameSiteCookieRequired * @NoTwoFactorRequired * - * @return FileDisplayResponse|NotFoundResponse + * @return DataDisplayResponse|NotFoundResponse */ public function getThemeStylesheet(string $themeId, bool $plain = false, bool $withCustomCss = false) { $themes = $this->themesService->getThemes(); diff --git a/apps/theming/lib/Service/ThemesService.php b/apps/theming/lib/Service/ThemesService.php index d8101c5b48a..c2e9e2b24bf 100644 --- a/apps/theming/lib/Service/ThemesService.php +++ b/apps/theming/lib/Service/ThemesService.php @@ -94,9 +94,10 @@ class ThemesService { }); // Retrieve IDs only + /** @var string[] */ $filteredThemesIds = array_map(function(ITheme $t) { return $t->getId(); - }, $filteredThemes); + }, array_values($filteredThemes)); $enabledThemes = [...array_diff($themesIds, $filteredThemesIds), $theme->getId()]; $this->setEnabledThemes($enabledThemes); @@ -136,6 +137,7 @@ class ThemesService { $themes = $this->getEnabledThemes(); return in_array($theme->getId(), $themes); } + return false; } /** diff --git a/apps/theming/lib/Themes/DefaultTheme.php b/apps/theming/lib/Themes/DefaultTheme.php index 7b0b123f19b..7efd8f133d7 100644 --- a/apps/theming/lib/Themes/DefaultTheme.php +++ b/apps/theming/lib/Themes/DefaultTheme.php @@ -35,6 +35,7 @@ use OCP\IURLGenerator; class DefaultTheme implements ITheme { public Util $util; public ThemingDefaults $themingDefaults; + public IURLGenerator $urlGenerator; public ImageManager $imageManager; public IConfig $config; public IL10N $l; diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php index 35c7703bd45..9a00bd1d5b1 100644 --- a/apps/theming/lib/Util.php +++ b/apps/theming/lib/Util.php @@ -111,13 +111,13 @@ class Util { * * Copied from cssphp, copyright Leaf Corcoran, licensed under MIT * - * @param integer $red - * @param integer $green - * @param integer $blue + * @param int $red + * @param int $green + * @param int $blue * - * @return array + * @return float[] */ - public function toHSL(string $red, string $green, string $blue): array { + public function toHSL(int $red, int $green, int $blue): array { $color = new Color(Color::rgbToHex(['R' => $red, 'G' => $green, 'B' => $blue])); return array_values($color->getHsl()); } diff --git a/apps/theming/src/components/ItemPreview.vue b/apps/theming/src/components/ItemPreview.vue index 0ed7dfc7858..82d588059a2 100644 --- a/apps/theming/src/components/ItemPreview.vue +++ b/apps/theming/src/components/ItemPreview.vue @@ -15,7 +15,7 @@ </template> <script> -import { generateFilePath} from '@nextcloud/router' +import { generateFilePath } from '@nextcloud/router' import CheckboxRadioSwitch from '@nextcloud/vue/dist/Components/CheckboxRadioSwitch' export default { diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index 863226922d8..d08312ad789 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -2355,11 +2355,6 @@ <code>$this</code> </InvalidScope> </file> - <file src="core/templates/layout.guest.php"> - <InvalidArgument occurrences="1"> - <code>false</code> - </InvalidArgument> - </file> <file src="core/templates/layout.public.php"> <UndefinedInterfaceMethod occurrences="1"> <code>getIcon</code> diff --git a/core/src/views/UnifiedSearch.vue b/core/src/views/UnifiedSearch.vue index 1e11d6bfbde..2d2d2d0a254 100644 --- a/core/src/views/UnifiedSearch.vue +++ b/core/src/views/UnifiedSearch.vue @@ -86,12 +86,16 @@ <div v-else> {{ t('core', 'Press enter to start searching') }} </div> - <template #icon><Magnify /></template> + <template #icon> + <Magnify /> + </template> </EmptyContent> <EmptyContent v-else-if="!isLoading || isShortQuery"> {{ t('core', 'Start typing to search') }} - <template #icon><Magnify /></template> + <template #icon> + <Magnify /> + </template> <template v-if="isShortQuery" #desc> {{ n('core', 'Please enter {minSearchLength} character or more to search', diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index 00e16414535..4efe072a5bb 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -40,7 +40,9 @@ $getUserAvatar = static function (int $size) use ($_): string { <?php emit_script_loading_tags($_); ?> <?php print_unescaped($_['headers']); ?> </head> - <body id="<?php p($_['bodyid']);?>" <?php foreach ($_['enabledThemes'] as $themeId) { p("data-theme-$themeId "); }?>> + <body id="<?php p($_['bodyid']);?>" <?php foreach ($_['enabledThemes'] as $themeId) { + p("data-theme-$themeId "); + }?>> <?php include 'layout.noscript.warning.php'; ?> <?php foreach ($_['initialStates'] as $app => $initialState) { ?> |