mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-17 06:18:44 +02:00
N°9144 Fix static analysis issues (#885)
* N°9144 Fix static analysis issues with phpstan * up to level 1 for all setup files * up to level 5 for all wizardsteps
This commit is contained in:
@@ -152,9 +152,9 @@ try {
|
||||
$sConfigFile = utils::GetConfigFilePath(ITOP_DEFAULT_ENV);
|
||||
if (file_exists($sConfigFile) && !is_writable($sConfigFile) && $oStep->RequiresWritableConfig()) {
|
||||
$sRelativePath = utils::GetConfigFilePathRelative(ITOP_DEFAULT_ENV);
|
||||
$oPage->error("<b>Error:</b> the configuration file '".$sRelativePath."' already exists and cannot be overwritten.");
|
||||
$oPage->p("The wizard cannot modify the configuration file for you. If you want to upgrade ".ITOP_APPLICATION.", make sure that the file '<b>".$sRelativePath."</b>' can be modified by the web server.");
|
||||
$oPage->output();
|
||||
$sErrorMsg = "<b>Error:</b> the configuration file '".$sRelativePath."' already exists and cannot be overwritten.";
|
||||
$sErrorMsg .= "The wizard cannot modify the configuration file for you. If you want to upgrade ".ITOP_APPLICATION.", make sure that the file '<b>".$sRelativePath."</b>' can be modified by the web server.";
|
||||
throw new Exception($sErrorMsg);
|
||||
} else {
|
||||
$oStep->AsyncAction($oPage, $sActionCode, $aParams);
|
||||
}
|
||||
@@ -180,9 +180,5 @@ try {
|
||||
}
|
||||
|
||||
if (function_exists('memory_get_peak_usage')) {
|
||||
if ($sOperation == 'file') {
|
||||
SetupLog::Info("loading file '$sFileName', peak memory usage. ".memory_get_peak_usage());
|
||||
} else {
|
||||
SetupLog::Info("operation '$sOperation', peak memory usage. ".memory_get_peak_usage());
|
||||
}
|
||||
SetupLog::Info("operation '$sOperation', peak memory usage. ".memory_get_peak_usage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user