Voidify setThemeCookie()

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
Kamil Tekiela 2024-08-16 12:01:22 +02:00
parent 70f7682425
commit 2d4d0c5ce5
3 changed files with 4 additions and 10 deletions

View File

@ -15515,11 +15515,6 @@ parameters:
count: 1
path: tests/unit/Table/TableTest.php
-
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertTrue\\(\\) with true will always evaluate to true\\.$#"
count: 1
path: tests/unit/Theme/ThemeManagerTest.php
-
message: "#^Casting to int something that's already int\\.$#"
count: 1

View File

@ -174,7 +174,7 @@ class ThemeManager
return false;
}
public function setThemeCookie(): true
public function setThemeCookie(): void
{
$config = Config::getInstance();
$config->setCookie(
@ -190,8 +190,6 @@ class ThemeManager
// force a change of a dummy session variable to avoid problems
// with the caching of phpmyadmin.css.php
$config->set('theme-update', $this->theme->id);
return true;
}
public function loadThemes(): void

View File

@ -67,8 +67,9 @@ class ThemeManagerTest extends AbstractTestCase
public function testSetThemeCookie(): void
{
$tm = new ThemeManager();
self::assertTrue(
$tm->setThemeCookie(),
$tm->setThemeCookie();
self::assertNotFalse(
$tm->getThemeCookie(),
);
}
}