Skip to content

Commit

Permalink
Lint and psalm fix
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ <[email protected]>
  • Loading branch information
skjnldsv committed Apr 21, 2022
1 parent 63a664f commit a5c4ce3
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion apps/theming/lib/Controller/ThemingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public function getImage(string $key, bool $useSvg = true) {
* @NoSameSiteCookieRequired
* @NoTwoFactorRequired
*
* @return FileDisplayResponse|NotFoundResponse
* @return DataDisplayResponse|NotFoundResponse
*/
public function getThemeStylesheet(string $themeId, bool $plain = false, bool $withCustomCss = false) {
$themes = $this->themesService->getThemes();
Expand Down
2 changes: 2 additions & 0 deletions apps/theming/lib/Service/ThemesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public function enableTheme(ITheme $theme): array {
});

// Retrieve IDs only
/** @var string[] */
$filteredThemesIds = array_map(function(ITheme $t) {
return $t->getId();
}, $filteredThemes);
Expand Down Expand Up @@ -136,6 +137,7 @@ public function isEnabled(ITheme $theme): bool {
$themes = $this->getEnabledThemes();
return in_array($theme->getId(), $themes);
}
return false;
}

/**
Expand Down
1 change: 1 addition & 0 deletions apps/theming/lib/Themes/DefaultTheme.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
class DefaultTheme implements ITheme {
public Util $util;
public ThemingDefaults $themingDefaults;
public IURLGenerator $urlGenerator;
public ImageManager $imageManager;
public IConfig $config;
public IL10N $l;
Expand Down
10 changes: 5 additions & 5 deletions apps/theming/lib/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ public function darken(string $color, int $factor): string {
*
* 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());
}
Expand Down
2 changes: 1 addition & 1 deletion apps/theming/src/components/ItemPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 6 additions & 2 deletions core/src/views/UnifiedSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 3 additions & 1 deletion core/templates/layout.user.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
<?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) { ?>
Expand Down

0 comments on commit a5c4ce3

Please sign in to comment.