Skip to content

Commit 47652b1

Browse files
Merge pull request #19491 from kamil-tekiela/ThemeManager-small-changes
ThemeManager small changes
2 parents 538ca13 + c8c0d43 commit 47652b1

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

src/Theme/ThemeManager.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,6 @@ public function setActiveTheme(string|null $theme): bool
116116
$this->activeTheme = $theme;
117117
$this->theme = $this->themes[$theme];
118118

119-
// need to set later
120-
//$this->setThemeCookie();
121-
122119
return true;
123120
}
124121

@@ -230,7 +227,14 @@ public function checkTheme(string|null $theme): bool
230227
return array_key_exists($theme ?? '', $this->themes);
231228
}
232229

233-
/** @return mixed[] */
230+
/** @return array{
231+
* id: string,
232+
* name: string,
233+
* version: string,
234+
* is_active: bool,
235+
* color_mode: string,
236+
* color_modes: array<string|int, string>
237+
* }[] $themes */
234238
public function getThemesArray(): array
235239
{
236240
$themes = [];

tests/unit/Theme/ThemeManagerTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ public function testGetThemesArray(): void
5454
$tm->initializeTheme();
5555
$themes = $tm->getThemesArray();
5656
self::assertArrayHasKey(0, $themes);
57-
self::assertIsArray($themes[0]);
58-
self::assertArrayHasKey('id', $themes[0]);
59-
self::assertArrayHasKey('name', $themes[0]);
60-
self::assertArrayHasKey('version', $themes[0]);
61-
self::assertArrayHasKey('is_active', $themes[0]);
6257
}
6358

6459
/**

0 commit comments

Comments
 (0)