fix phpstan mixed warning

master
Jean-Christian Paul Denis 2023-05-09 11:43:11 +02:00
parent 58a903a7c6
commit ad87b40d31
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
1 changed files with 4 additions and 3 deletions

View File

@ -22,9 +22,10 @@ class Install extends dcNsProcess
{ {
public static function init(): bool public static function init(): bool
{ {
static::$init = defined('DC_CONTEXT_ADMIN') if (defined('DC_CONTEXT_ADMIN') && My::phpCompliant()) {
&& My::phpCompliant() $version = dcCore::app()->plugins->moduleInfo(My::id(), 'version');
&& dcCore::app()->newVersion(My::id(), dcCore::app()->plugins->moduleInfo(My::id(), 'version')); static::$init = is_string($version) ? dcCore::app()->newVersion(My::id(), $version) : true;
}
return static::$init; return static::$init;
} }