Avoid use of dynamic properties deprecated in PHP 8.2

This commit is contained in:
raviks789 2023-07-04 09:51:41 +02:00
parent 6de4bd6e7e
commit 825f3a9b7f
2 changed files with 3 additions and 4 deletions

View File

@ -50,6 +50,9 @@ abstract class Command
/** @var bool Whether to automatically load enabled modules */
protected $loadEnabledModules = true;
/** @var bool Whether to enable trace for the CLI commands */
protected $trace = false;
public function __construct(App $app, $moduleName, $commandName, $actionName, $initialize = true)
{
$this->app = $app;

View File

@ -173,12 +173,10 @@ class ConfigMenu extends BaseHtmlElement
protected function getHealthCount()
{
$count = 0;
$title = null;
$worstState = null;
foreach (HealthHook::collectHealthData()->select() as $result) {
if ($worstState === null || $result->state > $worstState) {
$worstState = $result->state;
$title = $result->message;
$count = 1;
} elseif ($worstState === $result->state) {
$count++;
@ -200,8 +198,6 @@ class ConfigMenu extends BaseHtmlElement
break;
}
$this->title = $title;
return $count;
}