Skip to content

Commit 45e89d0

Browse files
ISSUE #1100: Store theme in database
1 parent 15b4e35 commit 45e89d0

File tree

2 files changed

+21
-22
lines changed

2 files changed

+21
-22
lines changed

composer.lock

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Infrastructure/Theme/Theme.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
final class Theme
1414
{
1515
/** @var array<string, mixed> */
16-
private static ?array $themeConfig = null;
16+
private static array $themeConfig;
1717
private static ?KeyValueStore $keyValueStore = null;
1818

1919
public static function setKeyValueStore(KeyValueStore $keyValueStore): void
@@ -29,11 +29,10 @@ private static function getThemeConfig(): array
2929
if (null === self::$keyValueStore) {
3030
throw new \RuntimeException('KeyValueStore not set. Please call Theme::setKeyValueStore() before using this method.');
3131
}
32-
if (null === self::$themeConfig) {
32+
if (!isset(self::$themeConfig)) {
3333
self::$themeConfig = Json::decode((string) self::$keyValueStore->find(Key::THEME));
3434
}
3535

36-
/* @var array<string, mixed> */
3736
return self::$themeConfig;
3837
}
3938

0 commit comments

Comments
 (0)